本文整理汇总了Java中org.eclipse.ocl.pivot.ids.IdResolver.getClass方法的典型用法代码示例。如果您正苦于以下问题:Java IdResolver.getClass方法的具体用法?Java IdResolver.getClass怎么用?Java IdResolver.getClass使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.ocl.pivot.ids.IdResolver
的用法示例。
在下文中一共展示了IdResolver.getClass方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: MAP_m_Visitable__ast_1
import org.eclipse.ocl.pivot.ids.IdResolver; //导入方法依赖的package包/类
/**
*
* map m_Visitable__ast_1 in Delphi_qvtp_qvtcas {
*
* guard:leftCS lSimpleFactor : delphi::simpleFactor[1];
* var designator1 : delphi::designator[?] := lSimpleFactor.designator;
* var ast : astm::Visitable[?] := designator1.ast;
* var aNameReference : astm::NameReference[1] := ast.oclAsType(astm::NameReference);
* set lSimpleFactor.ast := aNameReference;
*
*/
protected boolean MAP_m_Visitable__ast_1(final /*@NonInvalid*/ @NonNull simpleFactor lSimpleFactor) {
try {
final /*@NonInvalid*/ @NonNull IdResolver idResolver = executor.getIdResolver();
final /*@Thrown*/ @Nullable designator designator = lSimpleFactor.getDesignator();
if (designator == null) {
throw throwNull(lSimpleFactor, "Null source for \'\'http://www.xtext.org/example/delphi/Delphi\'::CSTrace::ast\'");
}
final /*@Thrown*/ @Nullable Visitable ast = designator.getAst();
final /*@NonInvalid*/ [email protected] Class TYP_astm_c_c_NameReference_0 = idResolver.getClass(CLSSid_NameReference, null);
final /*@Thrown*/ @NonNull NameReference oclAsType = ClassUtil.nonNullState((NameReference)OclAnyOclAsTypeOperation.INSTANCE.evaluate(executor, ast, TYP_astm_c_c_NameReference_0));
// mapping statements
lSimpleFactor.setAst(oclAsType);
final /*@Thrown*/ @Nullable Boolean m_Visitable__ast_1 = ValueUtil.TRUE_VALUE;
return m_Visitable__ast_1;
} catch (Throwable e) {
return handleExecutionFailure("MAP_m_Visitable__ast_1", e);
}
}
示例2: basicEvaluate
import org.eclipse.ocl.pivot.ids.IdResolver; //导入方法依赖的package包/类
@Override
public @Nullable Object basicEvaluate(@NonNull Executor executor, @NonNull TypedElement caller, @Nullable Object @NonNull [] sourceAndArgumentValues) {
@SuppressWarnings("null") final /*@NonInvalid*/ @NonNull Visitable self_23 = (/*@NonInvalid*/ @NonNull Visitable)sourceAndArgumentValues[0];
final /*@NonInvalid*/ @NonNull IdResolver idResolver = executor.getIdResolver();
final /*@NonInvalid*/ @Nullable Object parent = ClassifierOclContainerOperation.INSTANCE.evaluate(executor, self_23);
final /*@NonInvalid*/ boolean eq = parent == null;
/*@Thrown*/ @NonNull LookupEnvironment symbol_1;
if (eq) {
final /*@NonInvalid*/ [email protected] Class TYP_lookup_c_c_LookupEnvironment_0 = idResolver.getClass(CLSSid_LookupEnvironment, null);
final /*@NonInvalid*/ @NonNull LookupEnvironment symbol_0 = (LookupEnvironment)TYP_lookup_c_c_LookupEnvironment_0.createInstance();
symbol_1 = symbol_0;
}
else {
final /*@NonInvalid*/ [email protected] Class TYP_astm_c_c_Visitable_0 = idResolver.getClass(CLSSid_Visitable, null);
final /*@Thrown*/ @NonNull Visitable oclAsType = ClassUtil.nonNullState((Visitable)OclAnyOclAsTypeOperation.INSTANCE.evaluate(executor, parent, TYP_astm_c_c_Visitable_0));
final /*@Thrown*/ @NonNull LookupEnvironment _unqualified_env_VariableDefinition = INSTANCE_Visitable__unqualified_env_VariableDefinition.evaluate(oclAsType, self_23);
symbol_1 = _unqualified_env_VariableDefinition;
}
return symbol_1;
}
示例3: basicEvaluate
import org.eclipse.ocl.pivot.ids.IdResolver; //导入方法依赖的package包/类
@Override
public @Nullable Object basicEvaluate(@NonNull Executor executor, @NonNull TypedElement caller, @Nullable Object @NonNull [] sourceAndArgumentValues) {
@SuppressWarnings("null") final /*@NonInvalid*/ @NonNull Object self_3 = (/*@NonInvalid*/ @NonNull Object)sourceAndArgumentValues[0];
final /*@NonInvalid*/ @NonNull IdResolver idResolver = executor.getIdResolver();
final /*@NonInvalid*/ @Nullable Object parent = ClassifierOclContainerOperation.INSTANCE.evaluate(executor, self_3);
final /*@NonInvalid*/ boolean eq = parent == null;
/*@Thrown*/ @NonNull LookupEnvironment symbol_1;
if (eq) {
final /*@NonInvalid*/ or[email protected] Class TYP_lookup_c_c_LookupEnvironment_0 = idResolver.getClass(CLSSid_LookupEnvironment, null);
final /*@NonInvalid*/ @NonNull LookupEnvironment symbol_0 = (LookupEnvironment)TYP_lookup_c_c_LookupEnvironment_0.createInstance();
symbol_1 = symbol_0;
}
else {
if (parent == null) {
throw new InvalidValueException("Null source for \'OclElement::_unqualified_env_Employee(OclElement[?]) : lookup::LookupEnvironment[1]\'");
}
final /*@Thrown*/ @NonNull LookupEnvironment _unqualified_env_Employee = INSTANCE_OclElement__unqualified_env_Employee.evaluate(parent, self_3);
symbol_1 = _unqualified_env_Employee;
}
return symbol_1;
}
示例4: appliesConstraint
import org.eclipse.ocl.pivot.ids.IdResolver; //导入方法依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean appliesConstraint(final DiagnosticChain diagnostics, final Map<Object, Object> context) {
/**
*
* inv appliesConstraint:
* let
* severity : Integer[1] = 'Tosca_nodes_compute::appliesConstraint'.getSeverity()
* in
* if severity <= 0
* then true
* else
* let
* result : occi::Boolean[1] = self.entity.oclIsKindOf(infrastructure::Compute)
* in
* 'Tosca_nodes_compute::appliesConstraint'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)
* endif
*/
final /*@NonInvalid*/ Executor executor = PivotUtilInternal.getExecutor(this);
final /*@NonInvalid*/ IdResolver idResolver = executor.getIdResolver();
final /*@NonInvalid*/ IntegerValue severity_0 = CGStringGetSeverityOperation.INSTANCE.evaluate(executor, ToscaTables.STR_Tosca_nodes_compute_c_c_appliesConstraint);
final /*@NonInvalid*/ boolean le = OclComparableLessThanEqualOperation.INSTANCE.evaluate(executor, severity_0, ToscaTables.INT_0).booleanValue();
/*@NonInvalid*/ boolean symbol_0;
if (le) {
symbol_0 = ValueUtil.TRUE_VALUE;
}
else {
final /*@NonInvalid*/ org.eclipse.ocl.pivot.Class TYP_infrastructure_c_c_Compute = idResolver.getClass(ToscaTables.CLSSid_Compute, null);
final /*@NonInvalid*/ Entity entity = this.getEntity();
final /*@NonInvalid*/ boolean result = OclAnyOclIsKindOfOperation.INSTANCE.evaluate(executor, entity, TYP_infrastructure_c_c_Compute).booleanValue();
final /*@NonInvalid*/ boolean logDiagnostic = CGStringLogDiagnosticOperation.INSTANCE.evaluate(executor, TypeId.BOOLEAN, ToscaTables.STR_Tosca_nodes_compute_c_c_appliesConstraint, this, (Object)null, diagnostics, context, (Object)null, severity_0, result, ToscaTables.INT_0).booleanValue();
symbol_0 = logDiagnostic;
}
return Boolean.TRUE == symbol_0;
}
示例5: appliesConstraint
import org.eclipse.ocl.pivot.ids.IdResolver; //导入方法依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean appliesConstraint(final DiagnosticChain diagnostics, final Map<Object, Object> context) {
/**
*
* inv appliesConstraint:
* let severity : Integer[1] = 'Mem_large::appliesConstraint'.getSeverity()
* in
* if severity <= 0
* then true
* else
* let
* result : occi::Boolean[1] = self.entity.oclIsKindOf(infrastructure::Compute)
* in
* 'Mem_large::appliesConstraint'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)
* endif
*/
final /*@NonInvalid*/ Executor executor = PivotUtilInternal.getExecutor(this);
final /*@NonInvalid*/ IdResolver idResolver = executor.getIdResolver();
final /*@NonInvalid*/ IntegerValue severity_0 = CGStringGetSeverityOperation.INSTANCE.evaluate(executor, CrtpTables.STR_Mem_large_c_c_appliesConstraint);
final /*@NonInvalid*/ boolean le = OclComparableLessThanEqualOperation.INSTANCE.evaluate(executor, severity_0, CrtpTables.INT_0).booleanValue();
/*@NonInvalid*/ boolean symbol_0;
if (le) {
symbol_0 = ValueUtil.TRUE_VALUE;
}
else {
final /*@NonInvalid*/ org.eclipse.ocl.pivot.Class TYP_infrastructure_c_c_Compute_0 = idResolver.getClass(CrtpTables.CLSSid_Compute, null);
final /*@NonInvalid*/ Entity entity = this.getEntity();
final /*@NonInvalid*/ boolean result = OclAnyOclIsKindOfOperation.INSTANCE.evaluate(executor, entity, TYP_infrastructure_c_c_Compute_0).booleanValue();
final /*@NonInvalid*/ boolean logDiagnostic = CGStringLogDiagnosticOperation.INSTANCE.evaluate(executor, TypeId.BOOLEAN, CrtpTables.STR_Mem_large_c_c_appliesConstraint, this, (Object)null, diagnostics, context, (Object)null, severity_0, result, CrtpTables.INT_0).booleanValue();
symbol_0 = logDiagnostic;
}
return Boolean.TRUE == symbol_0;
}
示例6: appliesConstraint
import org.eclipse.ocl.pivot.ids.IdResolver; //导入方法依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean appliesConstraint(final DiagnosticChain diagnostics, final Map<Object, Object> context) {
/**
*
* inv appliesConstraint:
* let
* severity : Integer[1] = 'Tosca_relationships_root::appliesConstraint'.getSeverity()
* in
* if severity <= 0
* then true
* else
* let
* result : occi::Boolean[1] = self.entity.oclIsKindOf(occi::Link)
* in
* 'Tosca_relationships_root::appliesConstraint'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)
* endif
*/
final /*@NonInvalid*/ Executor executor = PivotUtilInternal.getExecutor(this);
final /*@NonInvalid*/ IdResolver idResolver = executor.getIdResolver();
final /*@NonInvalid*/ IntegerValue severity_0 = CGStringGetSeverityOperation.INSTANCE.evaluate(executor, ToscaTables.STR_Tosca_relationships_root_c_c_appliesConstraint);
final /*@NonInvalid*/ boolean le = OclComparableLessThanEqualOperation.INSTANCE.evaluate(executor, severity_0, ToscaTables.INT_0).booleanValue();
/*@NonInvalid*/ boolean symbol_0;
if (le) {
symbol_0 = ValueUtil.TRUE_VALUE;
}
else {
final /*@NonInvalid*/ org.eclipse.ocl.pivot.Class TYP_occi_c_c_Link = idResolver.getClass(ToscaTables.CLSSid_Link, null);
final /*@NonInvalid*/ Entity entity = this.getEntity();
final /*@NonInvalid*/ boolean result = OclAnyOclIsKindOfOperation.INSTANCE.evaluate(executor, entity, TYP_occi_c_c_Link).booleanValue();
final /*@NonInvalid*/ boolean logDiagnostic = CGStringLogDiagnosticOperation.INSTANCE.evaluate(executor, TypeId.BOOLEAN, ToscaTables.STR_Tosca_relationships_root_c_c_appliesConstraint, this, (Object)null, diagnostics, context, (Object)null, severity_0, result, ToscaTables.INT_0).booleanValue();
symbol_0 = logDiagnostic;
}
return Boolean.TRUE == symbol_0;
}
示例7: appliesConstraint
import org.eclipse.ocl.pivot.ids.IdResolver; //导入方法依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean appliesConstraint(final DiagnosticChain diagnostics, final Map<Object, Object> context) {
/**
*
* inv appliesConstraint:
* let severity : Integer[1] = 'App_tpl::appliesConstraint'.getSeverity()
* in
* if severity <= 0
* then true
* else
* let
* result : occi::Boolean[1] = self.entity.oclIsKindOf(Application)
* in
* 'App_tpl::appliesConstraint'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)
* endif
*/
final /*@NonInvalid*/ Executor executor = PivotUtilInternal.getExecutor(this);
final /*@NonInvalid*/ IdResolver idResolver = executor.getIdResolver();
final /*@NonInvalid*/ IntegerValue severity_0 = CGStringGetSeverityOperation.INSTANCE.evaluate(executor, PlatformTables.STR_App_tpl_c_c_appliesConstraint);
final /*@NonInvalid*/ boolean le = OclComparableLessThanEqualOperation.INSTANCE.evaluate(executor, severity_0, PlatformTables.INT_0).booleanValue();
/*@NonInvalid*/ boolean symbol_0;
if (le) {
symbol_0 = ValueUtil.TRUE_VALUE;
}
else {
final /*@NonInvalid*/ org.eclipse.ocl.pivot.Class TYP_platform_c_c_Application = idResolver.getClass(PlatformTables.CLSSid_Application, null);
final /*@NonInvalid*/ Entity entity = this.getEntity();
final /*@NonInvalid*/ boolean result = OclAnyOclIsKindOfOperation.INSTANCE.evaluate(executor, entity, TYP_platform_c_c_Application).booleanValue();
final /*@NonInvalid*/ boolean logDiagnostic = CGStringLogDiagnosticOperation.INSTANCE.evaluate(executor, TypeId.BOOLEAN, PlatformTables.STR_App_tpl_c_c_appliesConstraint, this, (Object)null, diagnostics, context, (Object)null, severity_0, result, PlatformTables.INT_0).booleanValue();
symbol_0 = logDiagnostic;
}
return Boolean.TRUE == symbol_0;
}
示例8: appliesConstraint
import org.eclipse.ocl.pivot.ids.IdResolver; //导入方法依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean appliesConstraint(final DiagnosticChain diagnostics, final Map<Object, Object> context) {
/**
*
* inv appliesConstraint:
* let
* severity : Integer[1] = 'Tosca_nodes_webapplication::appliesConstraint'.getSeverity()
* in
* if severity <= 0
* then true
* else
* let
* result : occi::Boolean[1] = self.entity.oclIsKindOf(platform::Component)
* in
* 'Tosca_nodes_webapplication::appliesConstraint'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)
* endif
*/
final /*@NonInvalid*/ Executor executor = PivotUtilInternal.getExecutor(this);
final /*@NonInvalid*/ IdResolver idResolver = executor.getIdResolver();
final /*@NonInvalid*/ IntegerValue severity_0 = CGStringGetSeverityOperation.INSTANCE.evaluate(executor, ToscaTables.STR_Tosca_nodes_webapplication_c_c_appliesConstraint);
final /*@NonInvalid*/ boolean le = OclComparableLessThanEqualOperation.INSTANCE.evaluate(executor, severity_0, ToscaTables.INT_0).booleanValue();
/*@NonInvalid*/ boolean symbol_0;
if (le) {
symbol_0 = ValueUtil.TRUE_VALUE;
}
else {
final /*@NonInvalid*/ org.eclipse.ocl.pivot.Class TYP_platform_c_c_Component = idResolver.getClass(ToscaTables.CLSSid_Component, null);
final /*@NonInvalid*/ Entity entity = this.getEntity();
final /*@NonInvalid*/ boolean result = OclAnyOclIsKindOfOperation.INSTANCE.evaluate(executor, entity, TYP_platform_c_c_Component).booleanValue();
final /*@NonInvalid*/ boolean logDiagnostic = CGStringLogDiagnosticOperation.INSTANCE.evaluate(executor, TypeId.BOOLEAN, ToscaTables.STR_Tosca_nodes_webapplication_c_c_appliesConstraint, this, (Object)null, diagnostics, context, (Object)null, severity_0, result, ToscaTables.INT_0).booleanValue();
symbol_0 = logDiagnostic;
}
return Boolean.TRUE == symbol_0;
}
示例9: appliesConstraint
import org.eclipse.ocl.pivot.ids.IdResolver; //导入方法依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean appliesConstraint(final DiagnosticChain diagnostics, final Map<Object, Object> context) {
/**
*
* inv appliesConstraint:
* let severity : Integer[1] = 'Aggregator::appliesConstraint'.getSeverity()
* in
* if severity <= 0
* then true
* else
* let result : occi::Boolean[1] = self.entity.oclIsKindOf(Sensor)
* in
* 'Aggregator::appliesConstraint'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)
* endif
*/
final /*@NonInvalid*/ Executor executor = PivotUtilInternal.getExecutor(this);
final /*@NonInvalid*/ IdResolver idResolver = executor.getIdResolver();
final /*@NonInvalid*/ IntegerValue severity_0 = CGStringGetSeverityOperation.INSTANCE.evaluate(executor, MonitoringTables.STR_Aggregator_c_c_appliesConstraint);
final /*@NonInvalid*/ boolean le = OclComparableLessThanEqualOperation.INSTANCE.evaluate(executor, severity_0, MonitoringTables.INT_0).booleanValue();
/*@NonInvalid*/ boolean symbol_0;
if (le) {
symbol_0 = ValueUtil.TRUE_VALUE;
}
else {
final /*@NonInvalid*/ org.eclipse.ocl.pivot.Class TYP_monitoring_c_c_Sensor = idResolver.getClass(MonitoringTables.CLSSid_Sensor, null);
final /*@NonInvalid*/ Entity entity = this.getEntity();
final /*@NonInvalid*/ boolean result = OclAnyOclIsKindOfOperation.INSTANCE.evaluate(executor, entity, TYP_monitoring_c_c_Sensor).booleanValue();
final /*@NonInvalid*/ boolean logDiagnostic = CGStringLogDiagnosticOperation.INSTANCE.evaluate(executor, TypeId.BOOLEAN, MonitoringTables.STR_Aggregator_c_c_appliesConstraint, this, (Object)null, diagnostics, context, (Object)null, severity_0, result, MonitoringTables.INT_0).booleanValue();
symbol_0 = logDiagnostic;
}
return Boolean.TRUE == symbol_0;
}
示例10: getEntities
import org.eclipse.ocl.pivot.ids.IdResolver; //导入方法依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Entity> getEntities() {
/**
* Entity.allInstances()->select(kind = self)
*/
final /*@NonInvalid*/ Executor executor = PivotUtilInternal.getExecutor(this);
final /*@NonInvalid*/ IdResolver idResolver = executor.getIdResolver();
final /*@NonInvalid*/ org.eclipse.ocl.pivot.Class TYP_occi_c_c_Entity_0 = idResolver.getClass(OCCITables.CLSSid_Entity, null);
final /*@NonInvalid*/ SetValue allInstances = ClassifierAllInstancesOperation.INSTANCE.evaluate(executor, OCCITables.SET_CLSSid_Entity, TYP_occi_c_c_Entity_0);
/*@Thrown*/ SetValue.Accumulator accumulator = ValueUtil.createSetAccumulatorValue(OCCITables.SET_CLSSid_Entity);
/*@NonNull*/ Iterator<Object> ITERATOR__1 = allInstances.iterator();
/*@NonInvalid*/ SetValue select;
while (true) {
if (!ITERATOR__1.hasNext()) {
select = accumulator;
break;
}
/*@NonInvalid*/ Entity _1 = (Entity)ITERATOR__1.next();
/**
* kind = self
*/
final /*@NonInvalid*/ Kind kind_0 = _1.getKind();
final /*@NonInvalid*/ boolean eq = kind_0.equals(this);
//
if (eq == ValueUtil.TRUE_VALUE) {
accumulator.add(_1);
}
}
final /*@NonInvalid*/ List<Entity> ECORE_select = ((IdResolver.IdResolverExtension)idResolver).ecoreValueOfAll(Entity.class, select);
return (EList<Entity>)ECORE_select;
}
示例11: appliesConstraint
import org.eclipse.ocl.pivot.ids.IdResolver; //导入方法依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean appliesConstraint(final DiagnosticChain diagnostics, final Map<Object, Object> context) {
/**
*
* inv appliesConstraint:
* let severity : Integer[1] = 'Ipnetwork::appliesConstraint'.getSeverity()
* in
* if severity <= 0
* then true
* else
* let result : occi::Boolean[1] = self.entity.oclIsKindOf(Network)
* in
* 'Ipnetwork::appliesConstraint'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)
* endif
*/
final /*@NonInvalid*/ Executor executor = PivotUtilInternal.getExecutor(this);
final /*@NonInvalid*/ IdResolver idResolver = executor.getIdResolver();
final /*@NonInvalid*/ IntegerValue severity_0 = CGStringGetSeverityOperation.INSTANCE.evaluate(executor, InfrastructureTables.STR_Ipnetwork_c_c_appliesConstraint);
final /*@NonInvalid*/ boolean le = OclComparableLessThanEqualOperation.INSTANCE.evaluate(executor, severity_0, InfrastructureTables.INT_0).booleanValue();
/*@NonInvalid*/ boolean symbol_0;
if (le) {
symbol_0 = ValueUtil.TRUE_VALUE;
}
else {
final /*@NonInvalid*/ org.eclipse.ocl.pivot.Class TYP_infrastructure_c_c_Network_0 = idResolver.getClass(InfrastructureTables.CLSSid_Network, null);
final /*@NonInvalid*/ Entity entity = this.getEntity();
final /*@NonInvalid*/ boolean result = OclAnyOclIsKindOfOperation.INSTANCE.evaluate(executor, entity, TYP_infrastructure_c_c_Network_0).booleanValue();
final /*@NonInvalid*/ boolean logDiagnostic = CGStringLogDiagnosticOperation.INSTANCE.evaluate(executor, TypeId.BOOLEAN, InfrastructureTables.STR_Ipnetwork_c_c_appliesConstraint, this, (Object)null, diagnostics, context, (Object)null, severity_0, result, InfrastructureTables.INT_0).booleanValue();
symbol_0 = logDiagnostic;
}
return Boolean.TRUE == symbol_0;
}
示例12: targetConstraint
import org.eclipse.ocl.pivot.ids.IdResolver; //导入方法依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean targetConstraint(final DiagnosticChain diagnostics, final Map<Object, Object> context) {
/**
*
* inv targetConstraint:
* let
* severity : Integer[1] = 'Networkinterface::targetConstraint'.getSeverity()
* in
* if severity <= 0
* then true
* else
* let result : occi::Boolean[1] = self.target.oclIsKindOf(Network)
* in
* 'Networkinterface::targetConstraint'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)
* endif
*/
final /*@NonInvalid*/ Executor executor = PivotUtilInternal.getExecutor(this);
final /*@NonInvalid*/ IdResolver idResolver = executor.getIdResolver();
final /*@NonInvalid*/ IntegerValue severity_0 = CGStringGetSeverityOperation.INSTANCE.evaluate(executor, InfrastructureTables.STR_Networkinterface_c_c_targetConstraint);
final /*@NonInvalid*/ boolean le = OclComparableLessThanEqualOperation.INSTANCE.evaluate(executor, severity_0, InfrastructureTables.INT_0).booleanValue();
/*@NonInvalid*/ boolean symbol_0;
if (le) {
symbol_0 = ValueUtil.TRUE_VALUE;
}
else {
final /*@NonInvalid*/ org.eclipse.ocl.pivot.Class TYP_infrastructure_c_c_Network_0 = idResolver.getClass(InfrastructureTables.CLSSid_Network, null);
final /*@NonInvalid*/ Resource target = this.getTarget();
final /*@NonInvalid*/ boolean result = OclAnyOclIsKindOfOperation.INSTANCE.evaluate(executor, target, TYP_infrastructure_c_c_Network_0).booleanValue();
final /*@NonInvalid*/ boolean logDiagnostic = CGStringLogDiagnosticOperation.INSTANCE.evaluate(executor, TypeId.BOOLEAN, InfrastructureTables.STR_Networkinterface_c_c_targetConstraint, this, (Object)null, diagnostics, context, (Object)null, severity_0, result, InfrastructureTables.INT_0).booleanValue();
symbol_0 = logDiagnostic;
}
return Boolean.TRUE == symbol_0;
}
示例13: appliesConstraint
import org.eclipse.ocl.pivot.ids.IdResolver; //导入方法依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean appliesConstraint(final DiagnosticChain diagnostics, final Map<Object, Object> context) {
/**
*
* inv appliesConstraint:
* let
* severity : Integer[1] = 'Ipnetworkinterface::appliesConstraint'.getSeverity()
* in
* if severity <= 0
* then true
* else
* let
* result : occi::Boolean[1] = self.entity.oclIsKindOf(Networkinterface)
* in
* 'Ipnetworkinterface::appliesConstraint'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)
* endif
*/
final /*@NonInvalid*/ Executor executor = PivotUtilInternal.getExecutor(this);
final /*@NonInvalid*/ IdResolver idResolver = executor.getIdResolver();
final /*@NonInvalid*/ IntegerValue severity_0 = CGStringGetSeverityOperation.INSTANCE.evaluate(executor, InfrastructureTables.STR_Ipnetworkinterface_c_c_appliesConstraint);
final /*@NonInvalid*/ boolean le = OclComparableLessThanEqualOperation.INSTANCE.evaluate(executor, severity_0, InfrastructureTables.INT_0).booleanValue();
/*@NonInvalid*/ boolean symbol_0;
if (le) {
symbol_0 = ValueUtil.TRUE_VALUE;
}
else {
final /*@NonInvalid*/ org.eclipse.ocl.pivot.Class TYP_infrastructure_c_c_Networkinterface = idResolver.getClass(InfrastructureTables.CLSSid_Networkinterface, null);
final /*@NonInvalid*/ Entity entity = this.getEntity();
final /*@NonInvalid*/ boolean result = OclAnyOclIsKindOfOperation.INSTANCE.evaluate(executor, entity, TYP_infrastructure_c_c_Networkinterface).booleanValue();
final /*@NonInvalid*/ boolean logDiagnostic = CGStringLogDiagnosticOperation.INSTANCE.evaluate(executor, TypeId.BOOLEAN, InfrastructureTables.STR_Ipnetworkinterface_c_c_appliesConstraint, this, (Object)null, diagnostics, context, (Object)null, severity_0, result, InfrastructureTables.INT_0).booleanValue();
symbol_0 = logDiagnostic;
}
return Boolean.TRUE == symbol_0;
}
示例14: appliesConstraint
import org.eclipse.ocl.pivot.ids.IdResolver; //导入方法依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean appliesConstraint(final DiagnosticChain diagnostics, final Map<Object, Object> context) {
/**
*
* inv appliesConstraint:
* let
* severity : Integer[1] = 'Agreement_term::appliesConstraint'.getSeverity()
* in
* if severity <= 0
* then true
* else
* let
* result : occi::Boolean[1] = self.entity.oclIsKindOf(Agreement)
* in
* 'Agreement_term::appliesConstraint'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)
* endif
*/
final /*@NonInvalid*/ Executor executor = PivotUtilInternal.getExecutor(this);
final /*@NonInvalid*/ IdResolver idResolver = executor.getIdResolver();
final /*@NonInvalid*/ IntegerValue severity_0 = CGStringGetSeverityOperation.INSTANCE.evaluate(executor, SlaTables.STR_Agreement_term_c_c_appliesConstraint);
final /*@NonInvalid*/ boolean le = OclComparableLessThanEqualOperation.INSTANCE.evaluate(executor, severity_0, SlaTables.INT_0).booleanValue();
/*@NonInvalid*/ boolean symbol_0;
if (le) {
symbol_0 = ValueUtil.TRUE_VALUE;
}
else {
final /*@NonInvalid*/ org.eclipse.ocl.pivot.Class TYP_sla_c_c_Agreement_0 = idResolver.getClass(SlaTables.CLSSid_Agreement, null);
final /*@NonInvalid*/ Entity entity = this.getEntity();
final /*@NonInvalid*/ boolean result = OclAnyOclIsKindOfOperation.INSTANCE.evaluate(executor, entity, TYP_sla_c_c_Agreement_0).booleanValue();
final /*@NonInvalid*/ boolean logDiagnostic = CGStringLogDiagnosticOperation.INSTANCE.evaluate(executor, TypeId.BOOLEAN, SlaTables.STR_Agreement_term_c_c_appliesConstraint, this, (Object)null, diagnostics, context, (Object)null, severity_0, result, SlaTables.INT_0).booleanValue();
symbol_0 = logDiagnostic;
}
return Boolean.TRUE == symbol_0;
}
示例15: appliesConstraint
import org.eclipse.ocl.pivot.ids.IdResolver; //导入方法依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean appliesConstraint(final DiagnosticChain diagnostics, final Map<Object, Object> context) {
/**
*
* inv appliesConstraint:
* let severity : Integer[1] = 'Os_tpl::appliesConstraint'.getSeverity()
* in
* if severity <= 0
* then true
* else
* let result : occi::Boolean[1] = self.entity.oclIsKindOf(Compute)
* in
* 'Os_tpl::appliesConstraint'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)
* endif
*/
final /*@NonInvalid*/ Executor executor = PivotUtilInternal.getExecutor(this);
final /*@NonInvalid*/ IdResolver idResolver = executor.getIdResolver();
final /*@NonInvalid*/ IntegerValue severity_0 = CGStringGetSeverityOperation.INSTANCE.evaluate(executor, InfrastructureTables.STR_Os_tpl_c_c_appliesConstraint);
final /*@NonInvalid*/ boolean le = OclComparableLessThanEqualOperation.INSTANCE.evaluate(executor, severity_0, InfrastructureTables.INT_0).booleanValue();
/*@NonInvalid*/ boolean symbol_0;
if (le) {
symbol_0 = ValueUtil.TRUE_VALUE;
}
else {
final /*@NonInvalid*/ org.eclipse.ocl.pivot.Class TYP_infrastructure_c_c_Compute = idResolver.getClass(InfrastructureTables.CLSSid_Compute, null);
final /*@NonInvalid*/ Entity entity = this.getEntity();
final /*@NonInvalid*/ boolean result = OclAnyOclIsKindOfOperation.INSTANCE.evaluate(executor, entity, TYP_infrastructure_c_c_Compute).booleanValue();
final /*@NonInvalid*/ boolean logDiagnostic = CGStringLogDiagnosticOperation.INSTANCE.evaluate(executor, TypeId.BOOLEAN, InfrastructureTables.STR_Os_tpl_c_c_appliesConstraint, this, (Object)null, diagnostics, context, (Object)null, severity_0, result, InfrastructureTables.INT_0).booleanValue();
symbol_0 = logDiagnostic;
}
return Boolean.TRUE == symbol_0;
}