public class MetaModelElement
extends java.lang.Object
An element type has a name, a parent element type, and a list of attributes. Attributes can contain data or references to model elements, and may be single-valued or multi-valued.
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttributeDescription(java.lang.String name)
Gets the description of an attribute.
|
java.util.Collection<java.lang.String> |
getAttributeNames()
Gets the attribute names of the metamodel element.
|
java.lang.String |
getExtensionReference()
Gets the name of the extension reference attribute.
|
java.lang.String |
getName()
Gets the name of this element type.
|
MetaModelElement |
getParent()
Gets the parent of this element type.
|
boolean |
hasAttribute(java.lang.String name)
Tests if this element type has an attribute of a given name.
|
boolean |
isRefAttribute(java.lang.String name)
Tests if an attribute is a cross-reference attribute.
|
boolean |
isSetAttribute(java.lang.String name)
Tests if an attribute is multi-valued.
|
boolean |
specializes(MetaModelElement base)
Checks if this type specializes another type.
|
public java.lang.String getName()
public MetaModelElement getParent()
null
if this is the
metamodel base element type.public boolean specializes(MetaModelElement base)
base
- Base type against which to checktrue
if the base
is the same type as
this type, or a direct or indirect parent of this type.public java.util.Collection<java.lang.String> getAttributeNames()
public boolean hasAttribute(java.lang.String name)
name
- Name of the candidate attributetrue
if this element type has an attribute of that
name.public boolean isRefAttribute(java.lang.String name)
name
- Name of the attribute to test.true
if the attribute is a cross-reference
attribute, false
if it is a data attribute.java.lang.IllegalArgumentException
- Element type has no such attribute.public java.lang.String getExtensionReference()
null
if none is defined.public boolean isSetAttribute(java.lang.String name)
name
- Name of the attribute to test.true
if the attribute is multi-valued,
false
if it only stores a single value.java.lang.IllegalArgumentException
- Element type has no such attribute.public java.lang.String getAttributeDescription(java.lang.String name)
name
- Name of the attribute.java.lang.IllegalArgumentException
- Element type has no such attribute.