|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.2) E13403-10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Tree
Base supertype of all AST nodes in the parse tree.
Field Summary | |
---|---|
static Tree[] |
EMPTY_ARRAY |
Method Summary | |
---|---|
void |
accept(TreeVisitor v) Visits this element. |
void |
addSelf(Tree parent) Performs an add (usually append) of this element to the parent. |
void |
addSelf(Tree sibling, boolean before) Performs an add of this element to the parent of the input sibling. |
void |
addSelfAfter(Tree sibling) |
void |
addSelfBefore(Tree sibling) |
java.lang.Object |
clearProperty(java.lang.String key) Nulls out the property stored with the given key. |
Tree |
cloneSelf(FileT targetFile) Performs a deep-copy of this Tree but attached to the input FileT. |
java.util.List |
getChildren() Gets the list of children Trees. |
FileT |
getOwningFile() Gets the owning FileT. |
Tree |
getParent() Gets the parent Tree to this. |
SourcePosition |
getPosition() Gets the position of this Tree object. |
java.lang.Object |
getProperty(java.lang.String key) Gets the property saved with the given key, null if none. |
Tree |
getSiblingAfter() Gets the sibling after this. |
Tree |
getSiblingBefore() Gets the sibling before this. |
java.util.ListIterator |
getSiblings() Gets a ListIterator for this Tree's siblings. |
TreeKind |
getTreeKind() Identifies what kind of Tree this is. |
boolean |
isSynthetic() True if this Tree element corresponds to an actual source representation. |
void |
removeSelf() Performs a remove of this element from its parent. |
void |
replaceSelf(Tree newElement) Performs a set of this element with the newElement. |
java.lang.Object |
setProperty(java.lang.String key, java.lang.Object data) Stores the input property. |
Field Detail |
---|
static final Tree[] EMPTY_ARRAY
Method Detail |
---|
TreeKind getTreeKind()
SourcePosition getPosition()
The line and column must both be non-negative, but the URI may be null.
boolean isSynthetic()
ClassT.getInterfacesClause()
when there is no interfaces declaration.FileT getOwningFile()
Tree getParent()
java.util.List getChildren()
List of Trees.
java.util.ListIterator getSiblings()
Note: Unlike ListIterator, next() and previous() will return null instead of throwing NoSuchElementException's. That allows the client to safely call getSiblings().previous() and getSiblings().next().
void accept(TreeVisitor v)
Tree getSiblingBefore()
This operation currently performs in time proportional to the number of siblings this element has. That is, this is not a fast operation.
Tree getSiblingAfter()
This operation currently performs in time proportional to the number of siblings this element has. That is, this is not a fast operation.
Tree cloneSelf(FileT targetFile)
Properties are not copied.
Cloning a FileT in this manner results in an UnsupportedOperationException. To clone a FileT, please use TreeManager.cloneSourceFile(FileT,FileT)
.
java.lang.UnsupportedOperationException
- if this is a FileT.void addSelf(Tree parent)
java.lang.UnsupportedOperationException
- if this element may not be added.java.lang.IllegalStateException
- if this element already has a parent.void addSelf(Tree sibling, boolean before)
before
- If true, this element will be added before the sibling. If false, this element will be added after the sibling.java.lang.UnsupportedOperationException
- if addSelf does same.java.lang.IllegalStateException
- if addSelf does same or if sibling does not have a parent.void addSelfBefore(Tree sibling)
void addSelfAfter(Tree sibling)
void replaceSelf(Tree newElement)
java.lang.UnsupportedOperationException
- if this element may not be removed or the new element may not be added.java.lang.IllegalStateException
- if this element does not have a parent or if the new element already has a parent.void removeSelf()
java.lang.UnsupportedOperationException
- if this element may not be removed.java.lang.IllegalStateException
- if the element does not have a parent.java.lang.Object getProperty(java.lang.String key)
Class.getName()
value.java.lang.Object setProperty(java.lang.String key, java.lang.Object data)
java.lang.Object clearProperty(java.lang.String key)
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.2) E13403-10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |