Class ContainableModelElement

    • Constructor Detail

      • ContainableModelElement

        protected ContainableModelElement​(java.lang.String name,
                                          IModelElement parent)
        Constructor for containable model element.
        Parameters:
        name - Name of the containable model element
        parent - the object, in which this specific one is embedded
    • Method Detail

      • getTopLevelParent

        public final IModelElement getTopLevelParent()
        Returns the topLevel parent.
        Returns:
        should be the project
      • getProject

        public final Project getProject()
        Returns the containing project.
        Returns:
        the contaning project (may be null if there is none)
      • isTopLevel

        public final boolean isTopLevel()
        Method to check whether the parent is a topLevel-element.
        Returns:
        true, if the parent is the project, otherwise false
      • getNameSpace

        public java.lang.String getNameSpace()
        Description copied from interface: IModelElement
        Returns the namespace introduced by this model element.
        Specified by:
        getNameSpace in interface IModelElement
        Overrides:
        getNameSpace in class ModelElement
        Returns:
        the namespace introduced by this model element.
      • setParent

        public final void setParent​(IModelElement parent)
        Changes the parent object. Note, that this operation is necessary (although not intended) to resolve some of the cycles in creating compounds or temporary variables.
        Parameters:
        parent - the parent element
      • accept

        public void accept​(IDatatypeVisitor visitor)
        Description copied from interface: IDatatypeVisitable
        Accepts a specialized visitor for creating a textual representation of the identity of this type.
        Specified by:
        accept in interface IDatatypeVisitable
        Parameters:
        visitor - the visitor to accept