Class ASMModelWrapper
java.lang.Object
org.eclipse.m2m.atl.core.ui.vm.asm.ASMModelWrapper
- All Implemented Interfaces:
IModel
,IReferenceModel
The RegularVM adaptation of the
IModel
, IReferenceModel
.-
Constructor Summary
ConstructorDescriptionASMModelWrapper
(ASMModelWrapper referenceModel, ASMFactory modelFactory, ModelLoader modelLoader, String modelName, String path, boolean newModel) Creates a newASMModelWrapper
.ASMModelWrapper
(ASMModel asmModel, ModelLoader modelLoader) Creates a newASMModelWrapper
, with the givenASMModel
. -
Method Summary
Modifier and TypeMethodDescriptionReturns the innerASMModel
.getElementsByType
(Object metaElement) Deprecated.unused in this implementationgetMetaElementByName
(String name) Deprecated.unused in this implementationReturns the ModelFactory used to create the current model.Returns the model loader that created the innerASMModel
.getName()
Returns the inner model name or <unnamed>.Returns theIReferenceModel
(i.e.boolean
Deprecated.unused in this implementationboolean
isTarget()
Defines if the model is readonly or not.newElement
(Object metaElement) Deprecated.unused in this implementationvoid
setAsmModel
(ASMModel asmModel) Sets the innerASMModel
.void
setIsTarget
(boolean value) Sets if the model is readonly or not.void
setReferenceModel
(ASMModelWrapper referenceModel) Sets the metamodel.
-
Constructor Details
-
ASMModelWrapper
public ASMModelWrapper(ASMModelWrapper referenceModel, ASMFactory modelFactory, ModelLoader modelLoader, String modelName, String path, boolean newModel) Creates a newASMModelWrapper
.- Parameters:
referenceModel
- theASMModelWrapper
metamodelmodelFactory
- the model loader creating this model.modelLoader
- the model loader creating the wrapped model.modelName
- the model namepath
- the model path (injection path for an existing one, extraction path for a new one)newModel
- true if the model is a new one (output model)
-
ASMModelWrapper
Creates a newASMModelWrapper
, with the givenASMModel
. This constructor is used to create metametamodels.- Parameters:
asmModel
- theASMModel
modelLoader
- theModelLoader
-
-
Method Details
-
getReferenceModel
Returns theIReferenceModel
(i.e. the metamodel).- Specified by:
getReferenceModel
in interfaceIModel
- Returns:
- the
IReferenceModel
- See Also:
-
setReferenceModel
Sets the metamodel.- Parameters:
referenceModel
- The metamodel to set.
-
getModelLoader
Returns the model loader that created the innerASMModel
.- Returns:
- The model loader.
-
getAsmModel
Returns the innerASMModel
.- Returns:
- the inner
ASMModel
.
-
setAsmModel
Sets the innerASMModel
.- Parameters:
asmModel
- The innerASMModel
to set.
-
getName
Returns the inner model name or <unnamed>.- Returns:
- the inner model name or <unnamed>.
-
isTarget
public boolean isTarget()Defines if the model is readonly or not. -
setIsTarget
public void setIsTarget(boolean value) Sets if the model is readonly or not.- Specified by:
setIsTarget
in interfaceIModel
- Parameters:
value
- true if the model allows writing- See Also:
-
getElementsByType
Deprecated.unused in this implementationReturns aSet
of the elements matching the given type.- Specified by:
getElementsByType
in interfaceIModel
- Parameters:
metaElement
- a metatype- Returns:
- a
Set
of the elements matching the given type - See Also:
-
newElement
Deprecated.unused in this implementationCreates a new element in the model.- Specified by:
newElement
in interfaceIModel
- Parameters:
metaElement
- the new element metatype- Returns:
- the newly created element
- See Also:
-
getMetaElementByName
Deprecated.unused in this implementationReturns the metaelement having the given name.- Specified by:
getMetaElementByName
in interfaceIReferenceModel
- Parameters:
name
- the given name- Returns:
- the metaelement having the given name
- See Also:
-
isModelOf
Deprecated.unused in this implementationReturns true if the given object is contained in this model's resource or a referenced resource. -
getModelFactory
Returns the ModelFactory used to create the current model.- Specified by:
getModelFactory
in interfaceIModel
- Returns:
- true if the model allows writing
- See Also:
-