Class ASMModelWrapper
- java.lang.Object
-
- org.eclipse.m2m.atl.core.ui.vm.asm.ASMModelWrapper
-
- All Implemented Interfaces:
IModel,IReferenceModel
public class ASMModelWrapper extends java.lang.Object implements IModel, IReferenceModel
The RegularVM adaptation of theIModel,IReferenceModel.
-
-
Constructor Summary
Constructors Constructor Description ASMModelWrapper(ASMModelWrapper referenceModel, ASMFactory modelFactory, ModelLoader modelLoader, java.lang.String modelName, java.lang.String path, boolean newModel)Creates a newASMModelWrapper.ASMModelWrapper(ASMModel asmModel, ModelLoader modelLoader)Creates a newASMModelWrapper, with the givenASMModel.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ASMModelgetAsmModel()Returns the innerASMModel.java.util.Set<? extends java.lang.Object>getElementsByType(java.lang.Object metaElement)Deprecated.unused in this implementationjava.lang.ObjectgetMetaElementByName(java.lang.String name)Deprecated.unused in this implementationASMFactorygetModelFactory()Returns the ModelFactory used to create the current model.ModelLoadergetModelLoader()Returns the model loader that created the innerASMModel.java.lang.StringgetName()Returns the inner model name or <unnamed>.IReferenceModelgetReferenceModel()Returns theIReferenceModel(i.e.booleanisModelOf(java.lang.Object object)Deprecated.unused in this implementationbooleanisTarget()Defines if the model is readonly or not.java.lang.ObjectnewElement(java.lang.Object metaElement)Deprecated.unused in this implementationvoidsetAsmModel(ASMModel asmModel)Sets the innerASMModel.voidsetIsTarget(boolean value)Sets if the model is readonly or not.voidsetReferenceModel(ASMModelWrapper referenceModel)Sets the metamodel.
-
-
-
Constructor Detail
-
ASMModelWrapper
public ASMModelWrapper(ASMModelWrapper referenceModel, ASMFactory modelFactory, ModelLoader modelLoader, java.lang.String modelName, java.lang.String path, boolean newModel)
Creates a newASMModelWrapper.- Parameters:
referenceModel- theASMModelWrappermetamodelmodelFactory- 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
public ASMModelWrapper(ASMModel asmModel, ModelLoader modelLoader)
Creates a newASMModelWrapper, with the givenASMModel. This constructor is used to create metametamodels.- Parameters:
asmModel- theASMModelmodelLoader- theModelLoader
-
-
Method Detail
-
getReferenceModel
public IReferenceModel getReferenceModel()
Returns theIReferenceModel(i.e. the metamodel).- Specified by:
getReferenceModelin interfaceIModel- Returns:
- the
IReferenceModel - See Also:
IModel.getReferenceModel()
-
setReferenceModel
public void setReferenceModel(ASMModelWrapper referenceModel)
Sets the metamodel.- Parameters:
referenceModel- The metamodel to set.
-
getModelLoader
public ModelLoader getModelLoader()
Returns the model loader that created the innerASMModel.- Returns:
- The model loader.
-
setAsmModel
public void setAsmModel(ASMModel asmModel)
Sets the innerASMModel.- Parameters:
asmModel- The innerASMModelto set.
-
getName
public java.lang.String 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.- Specified by:
isTargetin interfaceIModel- Returns:
- true if the model allows writing
- See Also:
IModel.isTarget()
-
setIsTarget
public void setIsTarget(boolean value)
Sets if the model is readonly or not.- Specified by:
setIsTargetin interfaceIModel- Parameters:
value- true if the model allows writing- See Also:
IModel.setIsTarget(boolean)
-
getElementsByType
public java.util.Set<? extends java.lang.Object> getElementsByType(java.lang.Object metaElement)
Deprecated.unused in this implementationReturns aSetof the elements matching the given type.- Specified by:
getElementsByTypein interfaceIModel- Parameters:
metaElement- a metatype- Returns:
- a
Setof the elements matching the given type - See Also:
IModel.getElementsByType(java.lang.Object)
-
newElement
public java.lang.Object newElement(java.lang.Object metaElement)
Deprecated.unused in this implementationCreates a new element in the model.- Specified by:
newElementin interfaceIModel- Parameters:
metaElement- the new element metatype- Returns:
- the newly created element
- See Also:
IModel.newElement(java.lang.Object)
-
getMetaElementByName
public java.lang.Object getMetaElementByName(java.lang.String name)
Deprecated.unused in this implementationReturns the metaelement having the given name.- Specified by:
getMetaElementByNamein interfaceIReferenceModel- Parameters:
name- the given name- Returns:
- the metaelement having the given name
- See Also:
IReferenceModel.getMetaElementByName(java.lang.String)
-
isModelOf
public boolean isModelOf(java.lang.Object object)
Deprecated.unused in this implementationReturns true if the given object is contained in this model's resource or a referenced resource.- Specified by:
isModelOfin interfaceIModel- Parameters:
object- the model element- Returns:
- true if object is contained in this model's resource or a referenced resource
- See Also:
IModel.isModelOf(java.lang.Object)
-
getModelFactory
public ASMFactory getModelFactory()
Returns the ModelFactory used to create the current model.- Specified by:
getModelFactoryin interfaceIModel- Returns:
- true if the model allows writing
- See Also:
IModel.getModelFactory()
-
-