Class ASMModelWrapper

    • Constructor Detail

      • ASMModelWrapper

        public ASMModelWrapper​(ASMModelWrapper referenceModel,
                               ASMFactory modelFactory,
                               ModelLoader modelLoader,
                               java.lang.String modelName,
                               java.lang.String path,
                               boolean newModel)
        Creates a new ASMModelWrapper.
        Parameters:
        referenceModel - the ASMModelWrapper metamodel
        modelFactory - the model loader creating this model.
        modelLoader - the model loader creating the wrapped model.
        modelName - the model name
        path - 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)
    • Method Detail

      • 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 inner ASMModel.
        Returns:
        The model loader.
      • setAsmModel

        public void setAsmModel​(ASMModel asmModel)
        Sets the inner ASMModel.
        Parameters:
        asmModel - The inner ASMModel to 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:
        isTarget in interface IModel
        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:
        setIsTarget in interface IModel
        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 implementation
        Returns a Set of the elements matching the given type.
        Specified by:
        getElementsByType in interface IModel
        Parameters:
        metaElement - a metatype
        Returns:
        a Set of 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 implementation
        Creates a new element in the model.
        Specified by:
        newElement in interface IModel
        Parameters:
        metaElement - the new element metatype
        Returns:
        the newly created element
        See Also:
        IModel.newElement(java.lang.Object)
      • isModelOf

        public boolean isModelOf​(java.lang.Object object)
        Deprecated.
        unused in this implementation
        Returns true if the given object is contained in this model's resource or a referenced resource.
        Specified by:
        isModelOf in interface IModel
        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)