Package org.eclipse.m2m.atl.engine.emfvm.adapter

# Interface IModelAdapter

All Known Implementing Classes:
  `EMFModelAdapter`, `UML2ModelAdapter`

public interface IModelAdapter
The EMFVM execution interface. Defines a set of methods dedicated to the execution of transformations.

## Method Summary

Modifier and Type
Method
Description
`void`
`delete(AbstractStackFrame frame, Object eo)`
Deletes an object on the given frame.
`void`
`finalizeModel(IModel model)`
Finalizes the given model.
`Object`
`get(AbstractStackFrame frame, Object eo, String name)`
Gets a value from an object in the given frame.
`Object`
`getID(Object element)`
Returns the element id.
`List<Object>`
`getSupertypes(Object type)`
Returns the list of supertypes of a given type.
`Object`
`getType(Object value)`
Returns the type of a given element.
`Object`
`invoke(Method method, Object self, Object[] arguments)`
Invokes a method.
`boolean`
`isDeleted(Object element)`
Checks if an elements has been deleted in refining mode and does not belong to any resource.
`boolean`
`isMetametaElement(Object element)`
Returns `true` if the given element is managed by the metametamodel of the current model adapter.
`boolean`
`isModelElement(Object o)`
Returns `true` if the given object is managed by the current model adapter.
`boolean`
`prettyPrint(ExecEnv execEnv, PrintStream out, Object value)`
Displays in a readable format the given object.
`void`
`registerVMSupertypes(Map<Class<?>,List<Class<?>>> vmSupertypes)`
Registers a map of supertypes.
`void`
`registerVMTypeOperations(Map<Object,Map<String,Operation>> vmTypeOperations)`
Registers a map of operations.
`void`
`set(AbstractStackFrame frame, Object eo, String name, 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(Object element, Object id)`
Sets the element id.
`void`
`unSet(AbstractStackFrame frame, Object eo, String name)`
Unsets a value on an object in the given frame.

## Method Details

### get

Object get(AbstractStackFrame frame, Object eo, String name)
Gets a value from an object in the given frame.

Parameters:
  `frame` - the `AbstractStackFrame`
  `eo` - the object
  `name` - the name of the attribute / feature which contains the value
Returns:
  the value

### set

void set(AbstractStackFrame frame, Object eo, String name, Object value)
Sets a value on an object in the given frame.

Parameters:
  `frame` - the `AbstractStackFrame`
  `eo` - the object
  `name` - the name of the attribute / feature which will contain the value
  `value` - the value to set

### unSet

void unSet(AbstractStackFrame frame, Object eo, String name)
Unsets a value on an object in the given frame.

Parameters:
  `frame` - the `AbstractStackFrame`
  `eo` - the object
  `name` - the name of the attribute / feature which will contain the value

### delete

void delete(AbstractStackFrame frame, Object eo)
Deletes an object on the given frame.

Parameters:
  `frame` - the `AbstractStackFrame`
  `eo` - the object to delete

### registerVMSupertypes

void registerVMSupertypes(Map<Class<?>,List<Class<?>>> vmSupertypes)
Registers a map of supertypes.

Parameters:
  `vmSupertypes` - the map

### registerVMTypeOperations

void registerVMTypeOperations(Map<Object,Map<String,Operation>> vmTypeOperations)
Registers a map of operations.

Parameters:
  `vmTypeOperations` - the map

### prettyPrint

boolean prettyPrint(ExecEnv execEnv, PrintStream out, Object value)
Displays in a readable format the given object.

Parameters:
  `execEnv` - the current execEnv
  `out` - the output stream
  `value` - the object to display
Returns:
  true if display has been successful

### getType

Object getType(Object value)
Returns the type of a given element.

Parameters:
  `value` - the type
Returns:
  the type

### getSupertypes

List<Object> getSupertypes(Object type)
Returns the list of supertypes of a given type.

Parameters:
  `type` - the type
Returns:
  the list of supertypes

### setAllowInterModelReferences

void setAllowInterModelReferences(boolean allowInterModelRefs)
Sets "allow inter-model references" for this model adapter.

Parameters:
  `allowInterModelRefs` - true if intermodel references are allowed

### invoke

Object invoke(Method method, Object self, Object[] arguments)
Invokes a method.

Parameters:
  `method` - the method to invoke
  `self` - the object context
  `arguments` - the call arguments
Returns:
  the method result

### finalizeModel

void finalizeModel(IModel model)
Finalizes the given model.

Parameters:
  `model` - the given model

### getID

Object getID(Object element)
Returns the element id.

Parameters:
  `element` - the element
Returns:
  the element id

### isDeleted

boolean isDeleted(Object element)
Checks if an elements has been deleted in refining mode and does not belong to any resource.

Parameters:
  `element` - the element
Returns:
  ture if the element has been deleted. False otherwise.

### setID

void setID(Object element, Object id)
Sets the element id.

Parameters:
  `element` - the element
  `id` - the id to set

### isModelElement

boolean isModelElement(Object o)
Returns `true` if the given object is managed by the current model adapter.

Parameters:
  `o` - the given object
Returns:
  `true` if the given object is managed by the current model adapter

### isMetametaElement

boolean isMetametaElement(Object element)
Returns `true` if the given element is managed by the metametamodel of the current model adapter.

Parameters:
  `element` - the given element
Returns:
  `true` if the given element is managed by the metametamodel of the current model adapter