|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.torque.generator.source.SourceElement
public class SourceElement
Implementation of the RichSourceElement interface.
Constructor Summary | |
---|---|
SourceElement(SourceElementName sourceElementName)
Constructor. |
|
SourceElement(String name)
Constructor. |
Method Summary | |
---|---|
SourceElement |
copy()
Creates a deep copy of this RichSourceelementImpl object. |
Object |
getAttribute(SourceAttributeName sourceAttributeName)
Returns the object stored in a given attribute. |
Object |
getAttribute(String name)
Returns the object stored in a given attribute. |
Set<String> |
getAttributeNames()
Returns the name of all set attributes. |
SourceElement |
getChild(SourceElementName sourceElementName)
Returns the first child of this SourceElement which has the given name. |
SourceElement |
getChild(String name)
Returns the first child of this SourceElement which has the given name. |
List<SourceElement> |
getChildren()
Returns all children of this SourceElement. |
List<SourceElement> |
getChildren(SourceElementName sourceElementName)
Returns all children of this SourceElement which have the given name. |
List<SourceElement> |
getChildren(String name)
Returns all children of this SourceElement which have the given name. |
List<SourceElement> |
getFollowing(String name)
Returns all the following elements after this element with the given name. |
String |
getName()
Returns the name of this source element. |
SourceElement |
getParent()
Returns the primary parent of this SourceElement. |
List<SourceElement> |
getParents()
Returns the list of parents of this SourceElement. |
List<SourceElement> |
getPreceding(String name)
Returns all the preceding elements before this element with the given name. |
Object |
getTextAttribute()
Returns the object stored in the attribute with key null. |
boolean |
graphEquals(SourceElement toCompare)
Checks whether the source element graph of this sourceElement, and its position therein, equals the source element graph and the position of the provided SourceElement. |
boolean |
hasChild(String name)
Returns whether children with the given name exist. |
boolean |
hasFollowing()
Returns whether a following element exists as a child of the parent of this element. |
boolean |
hasFollowingSibling()
Returns whether a following element exists as a child of the parent of this element, which has the same name as this source element. |
boolean |
hasPreceding()
Returns whether an preceding exists as a child of the parent of this element. |
boolean |
hasPrecedingSibling()
Returns whether an preceding exists as a child of the parent of this element, which has the same name as this source element. |
Object |
setAttribute(SourceAttributeName sourceAttributeName,
Object value)
Sets the attribute of a Source element. |
Object |
setAttribute(String name,
Object value)
Sets the attribute of a Source element. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SourceElement(String name)
name
- the name of the element, not null.
NullPointerException
- if name is null.public SourceElement(SourceElementName sourceElementName)
name
- sourceElementName name of the element, not null.
NullPointerException
- if sourceElementName is null.Method Detail |
---|
public String getName()
public SourceElement getParent()
public List<SourceElement> getParents()
public List<SourceElement> getChildren()
public List<SourceElement> getChildren(String name)
name
- the name of the children to select, not null.
NullPointerException
- if name is null.public List<SourceElement> getChildren(SourceElementName sourceElementName)
sourceElementName
- contains the name of the child to select,
not null.
NullPointerException
- if sourceElementName is null.public SourceElement getChild(String name)
name
- the name of the child to select, not null.
NullPointerException
- if name is null.public SourceElement getChild(SourceElementName sourceElementName)
sourceElementName
- contains the name of the child to select,
not null.
NullPointerException
- if sourceElementName is null.public boolean hasChild(String name)
name
- the name of the child element, not null.
NullPointerException
- if name is null.public List<SourceElement> getFollowing(String name)
name
- the name of the following elements to select,
or null to select all following elements.
public boolean hasFollowing()
public boolean hasPreceding()
public boolean hasFollowingSibling()
public boolean hasPrecedingSibling()
public List<SourceElement> getPreceding(String name)
name
- the name of the preceding elements to select,
or null to select all preceding elements.
public Object getTextAttribute()
public Object getAttribute(String name)
name
- the name of the attribute, can be null.
public Object getAttribute(SourceAttributeName sourceAttributeName)
sourceAttributeName
- contains the name of the attribute, not null.
NullPointerException
- if sourceAttributeName is null.public Object setAttribute(String name, Object value)
name
- the name of the attribute.value
- the value of the attribute,
or null to remove the attribute.
public Object setAttribute(SourceAttributeName sourceAttributeName, Object value)
sourceAttributeName
- contains the name of the attribute, not null.value
- the value of the attribute,
or null to remove the attribute.
public Set<String> getAttributeNames()
public SourceElement copy()
public boolean graphEquals(SourceElement toCompare)
toCompare
- the source element to compare, may be null.
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |