|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.m2m.atl.engine.emfvm.adapter.EMFModelAdapter
public class EMFModelAdapter
The model adapter dedicated to EMF.
Constructor Summary | |
---|---|
EMFModelAdapter()
Creates an EMF model adapter. |
Method Summary | |
---|---|
void |
delete(AbstractStackFrame frame,
java.lang.Object modelElement)
Deletes an object on the given frame. |
void |
finalizeModel(IModel model)
Finalizes the given model. |
java.lang.Object |
get(AbstractStackFrame frame,
java.lang.Object modelElement,
java.lang.String name)
Gets a value from an object in the given frame. |
static org.eclipse.emf.ecore.EEnumLiteral |
getEENumLiteral(org.eclipse.emf.ecore.EEnum eEnum,
java.lang.String id)
Returns the literal matching the given name or literal. |
java.lang.Object |
getID(java.lang.Object element)
Returns the element id. |
static java.lang.Object |
getNameOf(org.eclipse.emf.ecore.EObject eo)
Returns the name of an eObject. |
java.util.List<java.lang.Object> |
getSupertypes(java.lang.Object type)
Returns the list of supertypes of a given type. |
java.lang.Object |
getType(java.lang.Object value)
Returns the type of a given element. |
java.lang.Object |
invoke(java.lang.reflect.Method method,
java.lang.Object self,
java.lang.Object[] arguments)
Invokes a method. |
boolean |
isMetametaElement(java.lang.Object element)
Returns true if the given element is managed by the metametamodel of the current model adapter. |
boolean |
isModelElement(java.lang.Object o)
Returns true if the given object is managed by the current model adapter. |
boolean |
prettyPrint(ExecEnv execEnv,
java.io.PrintStream out,
java.lang.Object value)
Displays in a readable format the given object. |
void |
registerVMSupertypes(java.util.Map<java.lang.Class<?>,java.util.List<java.lang.Class<?>>> vmSupertypes)
Registers a map of supertypes. |
void |
registerVMTypeOperations(java.util.Map<java.lang.Object,java.util.Map<java.lang.String,Operation>> vmTypeOperations)
Registers a map of operations. |
void |
set(AbstractStackFrame frame,
java.lang.Object modelElement,
java.lang.String name,
java.lang.Object value)
Sets a value on an object in the given frame. |
void |
setAllowInterModelReferences(boolean allowInterModelRefs)
Sets "allow inter-model references" for this model adapter. |
void |
setID(java.lang.Object element,
java.lang.Object id)
Sets the element id. |
void |
unSet(AbstractStackFrame frame,
java.lang.Object modelElement,
java.lang.String name)
Unsets a value on an object in the given frame. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EMFModelAdapter()
Method Detail |
---|
public void setAllowInterModelReferences(boolean allowInterModelRefs)
setAllowInterModelReferences
in interface IModelAdapter
allowInterModelRefs
- the parameter valuepublic static java.lang.Object getNameOf(org.eclipse.emf.ecore.EObject eo)
eo
- the eObject
public static org.eclipse.emf.ecore.EEnumLiteral getEENumLiteral(org.eclipse.emf.ecore.EEnum eEnum, java.lang.String id)
eEnum
- the enumerationid
- the name or the literal
public java.util.List<java.lang.Object> getSupertypes(java.lang.Object type)
getSupertypes
in interface IModelAdapter
type
- the type
IModelAdapter.getSupertypes(java.lang.Object)
public java.lang.Object getType(java.lang.Object value)
getType
in interface IModelAdapter
value
- the type
IModelAdapter.getType(java.lang.Object)
public boolean prettyPrint(ExecEnv execEnv, java.io.PrintStream out, java.lang.Object value)
prettyPrint
in interface IModelAdapter
execEnv
- the current execEnvout
- the output streamvalue
- the object to display
IModelAdapter.prettyPrint(org.eclipse.m2m.atl.engine.emfvm.lib.ExecEnv,
java.io.PrintStream, java.lang.Object)
public void registerVMSupertypes(java.util.Map<java.lang.Class<?>,java.util.List<java.lang.Class<?>>> vmSupertypes)
registerVMSupertypes
in interface IModelAdapter
vmSupertypes
- the mapIModelAdapter.registerVMSupertypes(java.util.Map)
public void registerVMTypeOperations(java.util.Map<java.lang.Object,java.util.Map<java.lang.String,Operation>> vmTypeOperations)
registerVMTypeOperations
in interface IModelAdapter
vmTypeOperations
- the mapIModelAdapter.registerVMTypeOperations(java.util.Map)
public java.lang.Object get(AbstractStackFrame frame, java.lang.Object modelElement, java.lang.String name)
get
in interface IModelAdapter
frame
- the AbstractStackFrame
modelElement
- the objectname
- the name of the attribute / feature which contains the value
IModelAdapter.get(org.eclipse.m2m.atl.engine.emfvm.lib.AbstractStackFrame,
java.lang.Object, java.lang.String)
public void set(AbstractStackFrame frame, java.lang.Object modelElement, java.lang.String name, java.lang.Object value)
set
in interface IModelAdapter
frame
- the AbstractStackFrame
modelElement
- the objectname
- the name of the attribute / feature which will contain the valuevalue
- the value to setIModelAdapter.set(org.eclipse.m2m.atl.engine.emfvm.lib.AbstractStackFrame,
java.lang.Object, java.lang.String, java.lang.Object)
public void unSet(AbstractStackFrame frame, java.lang.Object modelElement, java.lang.String name)
unSet
in interface IModelAdapter
frame
- the AbstractStackFrame
modelElement
- the objectname
- the name of the attribute / feature which will contain the valueIModelAdapter.unSet(org.eclipse.m2m.atl.engine.emfvm.lib.AbstractStackFrame,
java.lang.Object, java.lang.String)
public void delete(AbstractStackFrame frame, java.lang.Object modelElement)
delete
in interface IModelAdapter
frame
- the AbstractStackFrame
modelElement
- the object to deleteIModelAdapter.delete(org.eclipse.m2m.atl.engine.emfvm.lib.AbstractStackFrame,
java.lang.Object)
public java.lang.Object invoke(java.lang.reflect.Method method, java.lang.Object self, java.lang.Object[] arguments)
invoke
in interface IModelAdapter
method
- the method to invokeself
- the object contextarguments
- the call arguments
IModelAdapter.invoke(java.lang.reflect.Method,
java.lang.Object, java.lang.Object[])
public void finalizeModel(IModel model)
finalizeModel
in interface IModelAdapter
model
- the given modelIModelAdapter.finalizeModel(org.eclipse.m2m.atl.core.IModel)
public java.lang.Object getID(java.lang.Object element)
getID
in interface IModelAdapter
element
- the element
IModelAdapter.getID(java.lang.Object)
public void setID(java.lang.Object element, java.lang.Object id)
setID
in interface IModelAdapter
element
- the elementid
- the id to setIModelAdapter.setID(java.lang.Object, java.lang.Object)
public boolean isModelElement(java.lang.Object o)
true
if the given object is managed by the current model adapter.
isModelElement
in interface IModelAdapter
o
- the given object
true
if the given object is managed by the current model adapterIModelAdapter.isModelElement(java.lang.Object)
public boolean isMetametaElement(java.lang.Object element)
true
if the given element is managed by the metametamodel of the current model adapter.
isMetametaElement
in interface IModelAdapter
element
- the given element
true
if the given element is managed by the metametamodel of the current model adapterIModelAdapter.isMetametaElement(java.lang.Object)
|
Copyright 2007 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |