|
||||||||||
| 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 |
| Field Summary |
|---|
| Fields inherited from interface net.sourceforge.nrl.parser.model.IModelElement |
|---|
OBJECT |
| 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 |
|---|
clone, equals, finalize, 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 IModelElementpublic String getName()
IModelElement
getName in interface IModelElementpublic IModelElement getParent()
IModelElement
getParent in interface IModelElementpublic List<IModelElement> getDescendants(boolean transitive)
IModelElement
getDescendants in interface IModelElementtransitive - 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 IModelElementpublic String getQualifiedName()
IModelElement
getQualifiedName in interface IModelElementpublic Object getUserData(String key)
IModelElement
getUserData in interface IModelElementkey - the key under which the data is stored
public boolean isAssignableFrom(IModelElement other)
IModelElement
isAssignableFrom in interface IModelElementother - the assigned object
public boolean isSupplementary()
IModelElement
isSupplementary in interface IModelElementpublic 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 IModelElementkey - 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 | |||||||||