Class ASMEMFModelElement
java.lang.Object
org.eclipse.m2m.atl.engine.vm.nativelib.ASMNativeObject
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclType
org.eclipse.m2m.atl.engine.vm.nativelib.ASMModelElement
org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement
- Direct Known Subclasses:
ASMUMLModelElement
The EMF implementation for ASMModelElement.
-
Field Summary
FieldsFields inherited from class org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclType
myTypeFields inherited from class org.eclipse.m2m.atl.engine.vm.nativelib.ASMNativeObject
nativeImpl -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedASMEMFModelElement(Map modelElements, ASMModel model, org.eclipse.emf.ecore.EObject object) Creates a newASMEMFModelElementwith the given parameters. -
Method Summary
Modifier and TypeMethodDescriptionstatic ASMOrderedSetallInstances(StackFrame frame, ASMEMFModelElement self) Returns all instances of a type.static ASMOrderedSetallInstancesFrom(StackFrame frame, ASMEMFModelElement self, ASMString sourceModelName) Returns all instances of a type from a given model.protected Objectasm2EMF(StackFrame frame, ASMOclAny value, String propName, org.eclipse.emf.ecore.EStructuralFeature feature) Converts an ASM element to its EMF equivalent.conformsTo(ASMOclType other) protected ASMOclAnyemf2ASM(StackFrame frame, Object value) Converts an EMF element to its ASM equivalent.protected voidfinalize()protected MethodfindMethod(Class cls, String name, Class[] argumentTypes) Returns the method which match the given parameters.get(StackFrame frame, String name) static org.eclipse.emf.ecore.EEnumLiteralgetEENumLiteral(org.eclipse.emf.ecore.EEnum eEnum, String id) Returns the literal matching the given name or literal.static ASMOclAnygetInstanceById(StackFrame frame, ASMEMFModelElement self, ASMString modelName, ASMString id) Returns the instance with the given id.org.eclipse.emf.ecore.EObjectReturns the internal EObject.getProperty(String name) getPropertyType(String name) invoke(StackFrame frame, String opName, List arguments) Searches for Operation opName in this context and invokes it if found.invokeSuper(StackFrame frame, String opName, List arguments) Searches for Operation opName in the superclass context and invokes it if found.static ASMModelElementnewInstance(StackFrame frame, ASMEMFModelElement self) Creates a new instance of a given type.static ASMModelElementnewInstanceIn(StackFrame frame, ASMEMFModelElement self, ASMString modelName) Creates a new instance of a given type.voidset(StackFrame frame, String name, ASMOclAny value) voidunset(StackFrame frame, String name) Methods inherited from class org.eclipse.m2m.atl.engine.vm.nativelib.ASMModelElement
createNewInstance, getAcquaintance, getMetaobject, getModel, getName, lookupElementExtended, otherEnd, setMetaobject, setName, toStringMethods inherited from class org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclType
addSupertype, conformsTo, getName, getSupertypes, getVMOperations, registerHelperAttribute, registerVMOperation, registerWeavingHelperMethods inherited from class org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny
asBag, asSequence, asSet, check, debug, findOperation, findOperation, getHelper, getNamedTargetFromSource, getOclAnyType, getType, invoke, isHelper, oclIsKindOf, oclIsTypeOf, oclIsUndefined, oclType, operatorEQ, operatorNE, output, refGetValue, refImmediateComposite, refInvokeOperation, refSetValue, refUnsetValue, setType, toStringMethods inherited from class org.eclipse.m2m.atl.engine.vm.nativelib.ASMNativeObject
getNativeImpl
-
Field Details
-
object
protected org.eclipse.emf.ecore.EObject object
-
-
Constructor Details
-
ASMEMFModelElement
protected ASMEMFModelElement(Map modelElements, ASMModel model, org.eclipse.emf.ecore.EObject object) Creates a newASMEMFModelElementwith the given parameters.- Parameters:
modelElements- the model elements mapmodel- the model elementobject- the object
-
-
Method Details
-
conformsTo
- Specified by:
conformsToin classASMModelElement- See Also:
-
getPropertyType
- Specified by:
getPropertyTypein classASMModelElement- See Also:
-
getProperty
- Specified by:
getPropertyin classASMModelElement- See Also:
-
refImmediateComposite
- Overrides:
refImmediateCompositein classASMOclAny- See Also:
-
get
- Specified by:
getin classASMModelElement- See Also:
-
asm2EMF
protected Object asm2EMF(StackFrame frame, ASMOclAny value, String propName, org.eclipse.emf.ecore.EStructuralFeature feature) Converts an ASM element to its EMF equivalent.- Parameters:
frame- the frame contextvalue- the element to convertpropName- the property namefeature- the feature which refers to the element- Returns:
- the converted element
-
emf2ASM
Converts an EMF element to its ASM equivalent.- Parameters:
frame- the frame contextvalue- the element to convert- Returns:
- the converted element
-
getEENumLiteral
public static org.eclipse.emf.ecore.EEnumLiteral getEENumLiteral(org.eclipse.emf.ecore.EEnum eEnum, String id) Returns the literal matching the given name or literal.- Parameters:
eEnum- the enumerationid- the name or the literal- Returns:
- the literal
-
set
- Overrides:
setin classASMModelElement- See Also:
-
unset
-
getInstanceById
public static ASMOclAny getInstanceById(StackFrame frame, ASMEMFModelElement self, ASMString modelName, ASMString id) Returns the instance with the given id. For testing purpose.- Parameters:
frame- the frame contextself- the current elementmodelName- the model nameid- the instance id- Returns:
- the instance
-
allInstances
Returns all instances of a type.- Parameters:
frame- the frame contextself- the caller type- Returns:
- all instances of a type
-
allInstancesFrom
public static ASMOrderedSet allInstancesFrom(StackFrame frame, ASMEMFModelElement self, ASMString sourceModelName) Returns all instances of a type from a given model. TODO: return type could be a Set because there is no order, in theory However, keeping resource (i.e., XMI) order is sometimes less confusing- Parameters:
frame- the frame contextself- the caller typesourceModelName- the model name- Returns:
- all instances of a type from a given model
-
newInstance
Creates a new instance of a given type.- Parameters:
frame- the frame contextself- the given type- Returns:
- the new element
-
newInstanceIn
public static ASMModelElement newInstanceIn(StackFrame frame, ASMEMFModelElement self, ASMString modelName) Creates a new instance of a given type.- Parameters:
frame- the frame contextself- the given typemodelName- the model where to create the element- Returns:
- the new element
-
findMethod
Returns the method which match the given parameters.- Parameters:
cls- the class which contains the methodname- the method nameargumentTypes- th method parameters- Returns:
- the method
-
invoke
Searches for Operation opName in this context and invokes it if found. -
invokeSuper
Searches for Operation opName in the superclass context and invokes it if found.- Overrides:
invokeSuperin classASMOclAny- Parameters:
frame- The current stack frameopName- The Operation's namearguments- The operation arguments, excluding self- Returns:
- The Operation's result or null
- See Also:
-
getObject
public org.eclipse.emf.ecore.EObject getObject()Returns the internal EObject.- Returns:
- The internal EObject.
-
finalize
-