本文整理汇总了Java中org.eclipse.ocl.pivot.ids.IdResolver类的典型用法代码示例。如果您正苦于以下问题:Java IdResolver类的具体用法?Java IdResolver怎么用?Java IdResolver使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IdResolver类属于org.eclipse.ocl.pivot.ids包,在下文中一共展示了IdResolver类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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_17 = (/*@NonInvalid*/ @NonNull Visitable)sourceAndArgumentValues[0];
final /*@NonInvalid*/ @NonNull IdResolver idResolver = executor.getIdResolver();
final /*@NonInvalid*/ @Nullable Object parent = ClassifierOclContainerOperation.INSTANCE.evaluate(executor, self_17);
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_FunctionDefinition = INSTANCE_Visitable__unqualified_env_FunctionDefinition.evaluate(oclAsType, self_17);
symbol_1 = _unqualified_env_FunctionDefinition;
}
return symbol_1;
}
示例2: MAP_m_m_constExpr_ast0
import org.eclipse.ocl.pivot.ids.IdResolver; //导入依赖的package包/类
/**
*
* map m_m_constExpr_ast0 in Delphi_qvtp_qvtcas {
*
* guard:leftCS lConstExpr : delphi::constExpr[1];
* check lConstExpr.oclIsTypeOf(delphi::constExpr);
* set lConstExpr.ast := null;
*
*/
protected boolean MAP_m_m_constExpr_ast0(final /*@NonInvalid*/ @NonNull constExpr lConstExpr) {
try {
final /*@NonInvalid*/ @NonNull IdResolver idResolver = executor.getIdResolver();
final /*@NonInvalid*/ [email protected] Class TYP_delphi_c_c_constExpr_0_0 = idResolver.getClass(CLSSid_constExpr, null);
final /*@NonInvalid*/ boolean oclIsTypeOf = OclAnyOclIsTypeOfOperation.INSTANCE.evaluate(executor, lConstExpr, TYP_delphi_c_c_constExpr_0_0).booleanValue();
/*@Thrown*/ @Nullable Boolean symbol_2;
if (oclIsTypeOf) {
// mapping statements
lConstExpr.setAst(null);
final /*@Thrown*/ @Nullable Boolean m_m_constExpr_ast0 = ValueUtil.TRUE_VALUE;
symbol_2 = m_m_constExpr_ast0;
}
else {
symbol_2 = ValueUtil.FALSE_VALUE;
}
return symbol_2;
} catch (Throwable e) {
return handleExecutionFailure("MAP_m_m_constExpr_ast0", e);
}
}
示例3: MAP_m_m_expression_ast0
import org.eclipse.ocl.pivot.ids.IdResolver; //导入依赖的package包/类
/**
*
* map m_m_expression_ast0 in Delphi_qvtp_qvtcas {
*
* guard:leftCS lExpression : delphi::expression[1];
* check lExpression.oclIsTypeOf(delphi::expression);
* set lExpression.ast := null;
*
*/
protected boolean MAP_m_m_expression_ast0(final /*@NonInvalid*/ @NonNull expression lExpression) {
try {
final /*@NonInvalid*/ @NonNull IdResolver idResolver = executor.getIdResolver();
final /*@NonInvalid*/ [email protected] Class TYP_delphi_c_c_expression_0_0 = idResolver.getClass(CLSSid_expression, null);
final /*@NonInvalid*/ boolean oclIsTypeOf = OclAnyOclIsTypeOfOperation.INSTANCE.evaluate(executor, lExpression, TYP_delphi_c_c_expression_0_0).booleanValue();
/*@Thrown*/ @Nullable Boolean symbol_2;
if (oclIsTypeOf) {
// mapping statements
lExpression.setAst(null);
final /*@Thrown*/ @Nullable Boolean m_m_expression_ast0 = ValueUtil.TRUE_VALUE;
symbol_2 = m_m_expression_ast0;
}
else {
symbol_2 = ValueUtil.FALSE_VALUE;
}
return symbol_2;
} catch (Throwable e) {
return handleExecutionFailure("MAP_m_m_expression_ast0", e);
}
}
示例4: MAP_m_m_file_ast0
import org.eclipse.ocl.pivot.ids.IdResolver; //导入依赖的package包/类
/**
*
* map m_m_file_ast0 in Delphi_qvtp_qvtcas {
*
* guard:leftCS lFile : delphi::file[1];
* check lFile.oclIsTypeOf(delphi::file);
* set lFile.ast := null;
*
*/
protected boolean MAP_m_m_file_ast0(final /*@NonInvalid*/ @NonNull file lFile) {
try {
final /*@NonInvalid*/ @NonNull IdResolver idResolver = executor.getIdResolver();
final /*@NonInvalid*/ [email protected] Class TYP_delphi_c_c_file_0_0 = idResolver.getClass(CLSSid_file, null);
final /*@NonInvalid*/ boolean oclIsTypeOf = OclAnyOclIsTypeOfOperation.INSTANCE.evaluate(executor, lFile, TYP_delphi_c_c_file_0_0).booleanValue();
/*@Thrown*/ @Nullable Boolean symbol_2;
if (oclIsTypeOf) {
// mapping statements
lFile.setAst(null);
final /*@Thrown*/ @Nullable Boolean m_m_file_ast0 = ValueUtil.TRUE_VALUE;
symbol_2 = m_m_file_ast0;
}
else {
symbol_2 = ValueUtil.FALSE_VALUE;
}
return symbol_2;
} catch (Throwable e) {
return handleExecutionFailure("MAP_m_m_file_ast0", e);
}
}
示例5: 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);
}
}
示例6: MAP_m_Visitable__ast_2
import org.eclipse.ocl.pivot.ids.IdResolver; //导入依赖的package包/类
/**
*
* map m_Visitable__ast_2 in Delphi_qvtp_qvtcas {
*
* guard:leftCS lConstExp : delphi::ConstExp[1];
* var exp : delphi::expression[?] := lConstExp.exp;
* var ast : astm::Visitable[?] := exp.ast;
* var aExpression : astm::Expression[1] := ast.oclAsType(astm::Expression);
* set lConstExp.ast := aExpression;
*
*/
protected boolean MAP_m_Visitable__ast_2(final /*@NonInvalid*/ @NonNull ConstExp lConstExp) {
try {
final /*@NonInvalid*/ @NonNull IdResolver idResolver = executor.getIdResolver();
final /*@Thrown*/ @Nullable expression exp = lConstExp.getExp();
if (exp == null) {
throw throwNull(lConstExp, "Null source for \'\'http://www.xtext.org/example/delphi/Delphi\'::CSTrace::ast\'");
}
final /*@Thrown*/ @Nullable Visitable ast = exp.getAst();
final /*@NonInvalid*/ [email protected] Class TYP_astm_c_c_Expression_0 = idResolver.getClass(CLSSid_Expression, null);
final /*@Thrown*/ @NonNull Expression oclAsType = ClassUtil.nonNullState((Expression)OclAnyOclAsTypeOperation.INSTANCE.evaluate(executor, ast, TYP_astm_c_c_Expression_0));
// mapping statements
lConstExp.setAst(oclAsType);
final /*@Thrown*/ @Nullable Boolean m_Visitable__ast_2 = ValueUtil.TRUE_VALUE;
return m_Visitable__ast_2;
} catch (Throwable e) {
return handleExecutionFailure("MAP_m_Visitable__ast_2", e);
}
}
示例7: MAP_m_m_unlabelledStatement_ast0
import org.eclipse.ocl.pivot.ids.IdResolver; //导入依赖的package包/类
/**
*
* map m_m_unlabelledStatement_ast0 in Delphi_qvtp_qvtcas {
*
* guard:leftCS lUnlabelledStatement : delphi::unlabelledStatement[1];
* check lUnlabelledStatement.oclIsTypeOf(delphi::unlabelledStatement);
* set lUnlabelledStatement.ast := null;
*
*/
protected boolean MAP_m_m_unlabelledStatement_ast0(final /*@NonInvalid*/ @NonNull unlabelledStatement lUnlabelledStatement) {
try {
final /*@NonInvalid*/ @NonNull IdResolver idResolver = executor.getIdResolver();
final /*@NonInvalid*/ [email protected] Class TYP_delphi_c_c_unlabelledStatement_0_0 = idResolver.getClass(CLSSid_unlabelledStatement, null);
final /*@NonInvalid*/ boolean oclIsTypeOf = OclAnyOclIsTypeOfOperation.INSTANCE.evaluate(executor, lUnlabelledStatement, TYP_delphi_c_c_unlabelledStatement_0_0).booleanValue();
/*@Thrown*/ @Nullable Boolean symbol_2;
if (oclIsTypeOf) {
// mapping statements
lUnlabelledStatement.setAst(null);
final /*@Thrown*/ @Nullable Boolean m_m_unlabelledStatement_ast0 = ValueUtil.TRUE_VALUE;
symbol_2 = m_m_unlabelledStatement_ast0;
}
else {
symbol_2 = ValueUtil.FALSE_VALUE;
}
return symbol_2;
} catch (Throwable e) {
return handleExecutionFailure("MAP_m_m_unlabelledStatement_ast0", e);
}
}
示例8: 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*/ CompilationUnit element_0 = (/*@NonInvalid*/ CompilationUnit)sourceAndArgumentValues[0];
final /*@NonInvalid*/ Class TYP_astm_c_c_VariableDefinition_0 = idResolver.getClass(CLSSid_VariableDefinition, null);
final /*@Thrown*/ List<DefinitionObject> fragments = element_0.getFragments();
final /*@Thrown*/ OrderedSetValue BOXED_fragments = idResolver.createOrderedSetOfAll(ORD_CLSSid_DefinitionObject, fragments);
final /*@Thrown*/ OrderedSetValue selectByKind = (OrderedSetValue)CollectionSelectByKindOperation.INSTANCE.evaluate(executor, BOXED_fragments, TYP_astm_c_c_VariableDefinition_0);
final /*@Thrown*/ List<VariableDefinition> ECORE_selectByKind = ((IdResolver.IdResolverExtension)idResolver).ecoreValueOfAll(VariableDefinition.class, selectByKind);
final /*@Thrown*/ LookupEnvironment inner = context.addElements(ECORE_selectByKind);
final /*@Thrown*/ boolean hasFinalResult_0 = inner.hasFinalResult();
/*@Thrown*/ LookupEnvironment symbol_0;
if (hasFinalResult_0) {
symbol_0 = inner;
}
else {
final /*@Thrown*/ LookupEnvironment parentEnv_0 = AstmUnqualifiedVariableDefinitionLookupVisitor.this.parentEnv(element_0);
symbol_0 = parentEnv_0;
}
return symbol_0;
}
示例9: 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*/ CompilationUnit element_0 = (/*@NonInvalid*/ CompilationUnit)sourceAndArgumentValues[0];
final /*@NonInvalid*/ Class TYP_astm_c_c_FunctionDefinition_0 = idResolver.getClass(CLSSid_FunctionDefinition, null);
final /*@Thrown*/ List<DefinitionObject> fragments = element_0.getFragments();
final /*@Thrown*/ OrderedSetValue BOXED_fragments = idResolver.createOrderedSetOfAll(ORD_CLSSid_DefinitionObject, fragments);
final /*@Thrown*/ OrderedSetValue selectByKind = (OrderedSetValue)CollectionSelectByKindOperation.INSTANCE.evaluate(executor, BOXED_fragments, TYP_astm_c_c_FunctionDefinition_0);
final /*@Thrown*/ List<FunctionDefinition> ECORE_selectByKind = ((IdResolver.IdResolverExtension)idResolver).ecoreValueOfAll(FunctionDefinition.class, selectByKind);
final /*@Thrown*/ LookupEnvironment inner = context.addElements(ECORE_selectByKind);
final /*@Thrown*/ boolean hasFinalResult_0 = inner.hasFinalResult();
/*@Thrown*/ LookupEnvironment symbol_0;
if (hasFinalResult_0) {
symbol_0 = inner;
}
else {
final /*@Thrown*/ LookupEnvironment parentEnv_0 = AstmUnqualifiedFunctionDefinitionLookupVisitor.this.parentEnv(element_0);
symbol_0 = parentEnv_0;
}
return symbol_0;
}
示例10: 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*/ [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;
}
示例11: visitCompany
import org.eclipse.ocl.pivot.ids.IdResolver; //导入依赖的package包/类
/**
* visitCompany(element : company::Company[1]) : lookup::LookupEnvironment[?]
*
* _'null' : lookup::LookupEnvironment[1]
*/
@Override
public /*@NonInvalid*/ LookupEnvironment visitCompany(final /*@NonInvalid*/ Company element) {
final /*@Thrown*/ SetValue BOXED_result = (SetValue)((ExecutorInternalExtension)executor).getCachedEvaluationResult(Company_GetEmployees.INSTANCE, null , new Object[]{element});
final /*@Thrown*/ List<Employee> ECORE_asSet = ((IdResolver.IdResolverExtension)idResolver).ecoreValueOfAll(Employee.class, BOXED_result);
final /*@Thrown*/ LookupEnvironment inner = context.addElements(ECORE_asSet);
final /*@Thrown*/ boolean hasFinalResult = inner.hasFinalResult();
/*@Thrown*/ LookupEnvironment symbol_0;
if (hasFinalResult) {
symbol_0 = inner;
}
else {
final /*@Thrown*/ LookupEnvironment parentEnv = this.parentEnv(element);
symbol_0 = parentEnv;
}
return symbol_0;
}
示例12: MAP_m_Y1_ast_name
import org.eclipse.ocl.pivot.ids.IdResolver; //导入依赖的package包/类
/**
*
* map m_Y1_ast_name in Source2Target_qvtp_qvtcas {
* leftCS (lY1 : source::Y1[?];
* |)
* { |}
* rightAS ( |)
* { |}
* where ( |)
* {aB : target::B[1] = lY1.ast.oclAsType(target::B);
* ast : ecore::EObject[?] = lY1.ast;
* name : String[?] = lY1.name;
* |
* aB.name := name;
* }
*
*/
protected boolean MAP_m_Y1_ast_name(final /*@NonInvalid*/ [email protected].NonNull Y1 lY1_0) throws ReflectiveOperationException {
try {
// predicates and unrealized variables
final /*@NonInvalid*/ [email protected] IdResolver idResolver = executor.getIdResolver();
final /*@NonInvalid*/ [email protected] Class TYP_target_c_c_B_0 = idResolver.getClass(CLSSid_B, null);
final /*@Thrown*/ [email protected] EObject ast = lY1_0.getAst();
final /*@Thrown*/ [email protected].NonNull B aB = ClassUtil.nonNullState((B)OclAnyOclAsTypeOperation.INSTANCE.evaluate(executor, ast, TYP_target_c_c_B_0));
final /*@Thrown*/ [email protected] EObject ast_0 = lY1_0.getAst();
final /*@Thrown*/ [email protected] String name = lY1_0.getName();
// property assignments
aB.setName(name);
boolean m_Y1_ast_name = ValueUtil.TRUE_VALUE;
return m_Y1_ast_name;
} catch (Throwable e) {
return handleExecutionFailure("MAP_m_Y1_ast_name", e);
}
}
示例13: MAP_m_Y1_ast_ownsZ
import org.eclipse.ocl.pivot.ids.IdResolver; //导入依赖的package包/类
/**
*
* map m_Y1_ast_ownsZ in Source2Target_qvtp_qvtcas {
* leftCS (lY1 : source::Y1[?];
* |)
* { |}
* rightAS ( |)
* { |}
* where ( |)
* {aB : target::B[1] = lY1.ast.oclAsType(target::B)
* ;
* ast : ecore::EObject[?] = lY1.ast;
* ownsZ : source::Z[?] = lY1.ownsZ;
* aD : target::D[1] = ownsZ.ast.oclAsType(target::D);
* ast1 : ecore::EObject[?] = ownsZ.ast;
* |
* aB.ownsD := aD;
* }
*
*/
protected boolean MAP_m_Y1_ast_ownsZ(final /*@NonInvalid*/ [email protected].NonNull Y1 lY1_1) throws ReflectiveOperationException {
try {
// predicates and unrealized variables
final /*@NonInvalid*/ [email protected] IdResolver idResolver = executor.getIdResolver();
final /*@NonInvalid*/ [email protected] Class TYP_target_c_c_B_0 = idResolver.getClass(CLSSid_B, null);
final /*@Thrown*/ [email protected] EObject ast = lY1_1.getAst();
final /*@Thrown*/ [email protected].NonNull B aB = ClassUtil.nonNullState((B)OclAnyOclAsTypeOperation.INSTANCE.evaluate(executor, ast, TYP_target_c_c_B_0));
final /*@Thrown*/ [email protected] EObject ast_0 = lY1_1.getAst();
final /*@Thrown*/ [email protected].Nullable Z ownsZ = lY1_1.getOwnsZ();
final /*@NonInvalid*/ [email protected] Class TYP_target_c_c_D_0 = idResolver.getClass(CLSSid_D, null);
if (ownsZ == null) {
throw throwNull(lY1_1, "Null source for \'\'http://uk.ac.york.cs.asbh.lang.cs2as/sourceMM/1.0\'::SElement::ast\'");
}
final /*@Thrown*/ [email protected] EObject ast_1 = ownsZ.getAst();
final /*@Thrown*/ [email protected].NonNull D aD = ClassUtil.nonNullState((D)OclAnyOclAsTypeOperation.INSTANCE.evaluate(executor, ast_1, TYP_target_c_c_D_0));
final /*@Thrown*/ [email protected] EObject ast1 = ownsZ.getAst();
// property assignments
aB.setOwnsD(aD);
boolean m_Y1_ast_ownsZ = ValueUtil.TRUE_VALUE;
return m_Y1_ast_ownsZ;
} catch (Throwable e) {
return handleExecutionFailure("MAP_m_Y1_ast_ownsZ", e);
}
}
示例14: MAP_m_Y2_ast_name
import org.eclipse.ocl.pivot.ids.IdResolver; //导入依赖的package包/类
/**
*
* map m_Y2_ast_name in Source2Target_qvtp_qvtcas {
* leftCS (lY2 : source::Y2[?];
* |)
* { |}
* rightAS ( |)
* { |}
* where ( |)
* {aC : target::C[1] = lY2.ast.oclAsType(target::C);
* ast : ecore::EObject[?] = lY2.ast;
* name : String[?] = lY2.name;
* |
* aC.name := name;
* }
*
*/
protected boolean MAP_m_Y2_ast_name(final /*@NonInvalid*/ [email protected].NonNull Y2 lY2_0) throws ReflectiveOperationException {
try {
// predicates and unrealized variables
final /*@NonInvalid*/ [email protected] IdResolver idResolver = executor.getIdResolver();
final /*@NonInvalid*/ [email protected] Class TYP_target_c_c_C_0 = idResolver.getClass(CLSSid_C, null);
final /*@Thrown*/ [email protected] EObject ast = lY2_0.getAst();
final /*@Thrown*/ [email protected].NonNull C aC = ClassUtil.nonNullState((C)OclAnyOclAsTypeOperation.INSTANCE.evaluate(executor, ast, TYP_target_c_c_C_0));
final /*@Thrown*/ [email protected] EObject ast_0 = lY2_0.getAst();
final /*@Thrown*/ [email protected] String name = lY2_0.getName();
// property assignments
aC.setName(name);
boolean m_Y2_ast_name = ValueUtil.TRUE_VALUE;
return m_Y2_ast_name;
} catch (Throwable e) {
return handleExecutionFailure("MAP_m_Y2_ast_name", e);
}
}
示例15: MAP_m_Y2_ast_ownsZ
import org.eclipse.ocl.pivot.ids.IdResolver; //导入依赖的package包/类
/**
*
* map m_Y2_ast_ownsZ in Source2Target_qvtp_qvtcas {
* leftCS (lY2 : source::Y2[?];
* |)
* { |}
* rightAS ( |)
* { |}
* where ( |)
* {aC : target::C[1] = lY2.ast.oclAsType(target::C)
* ;
* ast : ecore::EObject[?] = lY2.ast;
* ownsZ : source::Z[?] = lY2.ownsZ;
* aD : target::D[1] = ownsZ.ast.oclAsType(target::D);
* ast1 : ecore::EObject[?] = ownsZ.ast;
* |
* aC.ownsD := aD;
* }
*
*/
protected boolean MAP_m_Y2_ast_ownsZ(final /*@NonInvalid*/ [email protected].NonNull Y2 lY2_1) throws ReflectiveOperationException {
try {
// predicates and unrealized variables
final /*@NonInvalid*/ [email protected] IdResolver idResolver = executor.getIdResolver();
final /*@NonInvalid*/ [email protected] Class TYP_target_c_c_C_0 = idResolver.getClass(CLSSid_C, null);
final /*@Thrown*/ [email protected] EObject ast = lY2_1.getAst();
final /*@Thrown*/ [email protected].NonNull C aC = ClassUtil.nonNullState((C)OclAnyOclAsTypeOperation.INSTANCE.evaluate(executor, ast, TYP_target_c_c_C_0));
final /*@Thrown*/ [email protected] EObject ast_0 = lY2_1.getAst();
final /*@Thrown*/ [email protected].Nullable Z ownsZ = lY2_1.getOwnsZ();
final /*@NonInvalid*/ [email protected] Class TYP_target_c_c_D_0 = idResolver.getClass(CLSSid_D, null);
if (ownsZ == null) {
throw throwNull(lY2_1, "Null source for \'\'http://uk.ac.york.cs.asbh.lang.cs2as/sourceMM/1.0\'::SElement::ast\'");
}
final /*@Thrown*/ [email protected] EObject ast_1 = ownsZ.getAst();
final /*@Thrown*/ [email protected].NonNull D aD = ClassUtil.nonNullState((D)OclAnyOclAsTypeOperation.INSTANCE.evaluate(executor, ast_1, TYP_target_c_c_D_0));
final /*@Thrown*/ [email protected] EObject ast1 = ownsZ.getAst();
// property assignments
aC.setOwnsD(aD);
boolean m_Y2_ast_ownsZ = ValueUtil.TRUE_VALUE;
return m_Y2_ast_ownsZ;
} catch (Throwable e) {
return handleExecutionFailure("MAP_m_Y2_ast_ownsZ", e);
}
}