Class ASMEMFModel

Direct Known Subclasses:
ASMUMLModel

public class ASMEMFModel extends ASMModel
The ASMModel specialization for EMF.
  • Field Details

    • mofmm

      protected static ASMEMFModel mofmm
      These meta model definition shall be redefined in all sub-classes of ASMEMFModel.
    • extent

      protected org.eclipse.emf.ecore.resource.Resource extent
      These meta model definition shall be redefined in all sub-classes of ASMEMFModel.
    • referencedExtents

      protected Set referencedExtents
      These meta model definition shall be redefined in all sub-classes of ASMEMFModel.
    • resolveURI

      protected String resolveURI
      If not null, model could not yet be loaded from URI and needs to be loaded later from this URI.
    • modelElements

      protected Map modelElements
      Lookup table of ASMModelElement by EObject.
  • Constructor Details

    • ASMEMFModel

      protected ASMEMFModel(String name, org.eclipse.emf.ecore.resource.Resource extent, ASMEMFModel metamodel, boolean isTarget, ModelLoader ml)
      Creates a new ASMEMFModel.
      Parameters:
      name - the model name
      extent - the resource extent
      metamodel - the metamodel
      isTarget - true if the model is a target model
      ml - the model loader
  • Method Details

    • getMOF

      public static ASMModel getMOF()
      Returns the meta-meta-model.
      Returns:
      the meta-meta-model.
    • getASMModelElement

      public ASMModelElement getASMModelElement(org.eclipse.emf.ecore.EObject object)
      Returns the ASMModelElement corresponding to the given EObject.
      Parameters:
      object - the given EObject
      Returns:
      the ASMModelElement
    • findModelElement

      public ASMModelElement findModelElement(String name)
      Finds a Classifier in a Metamodel.
      Specified by:
      findModelElement in class ASMModel
      See Also:
    • getElementsByType

      public Set getElementsByType(ASMModelElement type)
      Returns The set of ASMModelElements that are instances of type and are contained in this model.
      Specified by:
      getElementsByType in class ASMModel
      Parameters:
      type - The type of element to search for.
      Returns:
      The set of ASMModelElements that are instances of type.
      See Also:
    • getAllElementsByType

      public Set getAllElementsByType(String typeName)
      Returns The set of ASMModelElements that are instances of type and are contained in this model or any referenced meta-model.
      Parameters:
      typeName - The type of element to search for.
      Returns:
      The set of ASMModelElements that are instances of type.
      See Also:
    • getAllElementsByType

      public Set getAllElementsByType(ASMModelElement type)
      Returns The set of ASMModelElements that are instances of type and are contained in this model or any referenced meta-model.
      Parameters:
      type - The type of element to search for.
      Returns:
      The set of ASMModelElements that are instances of type.
      See Also:
    • newModelElement

      public ASMModelElement newModelElement(ASMModelElement type)
      Specified by:
      newModelElement in class ASMModel
      See Also:
    • getExtent

      public org.eclipse.emf.ecore.resource.Resource getExtent()
      Returns the EMF resource containing the model.
      Returns:
      The EMF resource containing the model
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
      See Also:
    • getReferencedExtents

      public Set getReferencedExtents()
      Returns The set of referenced Resources.
      Returns:
      The set of referenced Resources
    • finalize

      protected void finalize() throws Throwable
      Overrides:
      finalize in class Object
      Throws:
      Throwable
      See Also: