|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.nrl.parser.model.AbstractModelElement
public abstract class AbstractModelElement
Basic abstract implementation of a model element that manages the name and parent. Subclasses provide further details.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface net.sourceforge.nrl.parser.model.IModelElement |
---|
IModelElement.ElementType |
Constructor Summary | |
---|---|
AbstractModelElement(String name,
IPackage container)
|
Method Summary | |
---|---|
void |
addChild(IModelElement child)
|
IPackage |
getContainingPackage()
Return the package containing this model element |
List<IModelElement> |
getDescendants(boolean transitive)
Return a list of elements that inherit fromm this. |
String |
getName()
Return the model element's name. |
String |
getOriginalName()
Some elements have to be renamed on loading. |
IModelElement |
getParent()
Return the parent, if there is an inheritance relationship, or null if none. |
String |
getQualifiedName()
Return a fully qualified name for this element, listing all the package it is contained in. |
Object |
getUserData(String key)
Return user data stored on this model element. |
boolean |
isAssignableFrom(IModelElement other)
Return true if the model element can be assigned the value of another in an expression. |
boolean |
isSupplementary()
Returns a flag indicating whether the element is a supplementary element loaded from a type library or dependent model. |
void |
setName(String name)
|
void |
setOriginalName(String name)
|
void |
setParent(IModelElement parent)
|
void |
setSupplementary(boolean supplementary)
|
void |
setUserData(String key,
Object data)
Set user data to be stored on this model element. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sourceforge.nrl.parser.model.IModelElement |
---|
getDocumentation, getElementType |
Constructor Detail |
---|
public AbstractModelElement(String name, IPackage container)
Method Detail |
---|
public void addChild(IModelElement child)
public IPackage getContainingPackage()
IModelElement
getContainingPackage
in interface IModelElement
public String getName()
IModelElement
getName
in interface IModelElement
public IModelElement getParent()
IModelElement
getParent
in interface IModelElement
public List<IModelElement> getDescendants(boolean transitive)
IModelElement
getDescendants
in interface IModelElement
transitive
- if true, return children of children recursively
public String getOriginalName()
IModelElement
In all other cases, the method returns the same as IModelElement.getName()
.
getOriginalName
in interface IModelElement
public String getQualifiedName()
IModelElement
getQualifiedName
in interface IModelElement
public Object getUserData(String key)
IModelElement
getUserData
in interface IModelElement
key
- the key under which the data is stored
public boolean isAssignableFrom(IModelElement other)
IModelElement
isAssignableFrom
in interface IModelElement
other
- the assigned object
public boolean isSupplementary()
IModelElement
isSupplementary
in interface IModelElement
public void setName(String name)
public void setOriginalName(String name)
public void setParent(IModelElement parent)
public void setSupplementary(boolean supplementary)
public void setUserData(String key, Object data)
IModelElement
setUserData
in interface IModelElement
key
- the key under which the data is storeddata
- the data
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |