Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javax.ide.model.java.source.tree
Interface Tree  view Tree download Tree.java

All Known Subinterfaces:
AnnotationExpressionT, AnnotationT, ArrayAccessExpressionT, AssertStatementT, AssignmentExpressionT, BlockElementT, BlockStatementT, BlockT, BreakStatementT, CatchClauseT, ClassBodyT, ClassInitializerT, ClassT, CompoundStatementT, ConditionalStatementT, ContinueStatementT, DereferenceExpressionT, DocCommentT, DocElementT, DocTagT, DoStatementT, DotExpressionT, ElseClauseT, EmptyStatementT, ExpressionStatementT, ExpressionT, FieldDeclT, FieldVariableT, FileT, FinallyClauseT, FormalParameterListT, FormalParameterT, ForStatementT, HasModifiersT, HasNameT, IdentifierExpressionT, IfStatementT, ImportT, InfixExpressionT, InterfacesT, InvokeExpressionT, ListExpressionT, LiteralExpressionT, LocalVariableDeclT, LocalVariableT, MemberT, MethodCallExpressionT, MethodT, ModifiersT, NameT, NewArrayExpressionT, NewClassExpressionT, OperatorExpressionT, PackageT, QuestionExpressionT, ReturnStatementT, SimpleStatementT, StatementLabelT, StatementT, SuperclassT, SwitchLabelT, SwitchStatementT, SynchStatementT, ThrowsT, ThrowStatementT, TryStatementT, TypeArgumentT, TypecastExpressionT, TypeExpressionT, TypeParameterT, TypeReferenceT, UnaryExpressionT, VariableDeclT, VariableT, WhileStatementT, WrapperExpressionT

public interface Tree

Base supertype of all AST nodes in the parse tree.


Field Summary
static Tree[] EMPTY_ARRAY
           
 
Method Summary
 void accept(javax.ide.model.java.source.util.TreeTraversal t)
          Visits this element and its children (as determined by getChildren() 55 ).
 void accept(javax.ide.model.java.source.util.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)
           
 void 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.
 javax.ide.model.java.source.util.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

EMPTY_ARRAY

public static final Tree[] EMPTY_ARRAY
Method Detail

getTreeKind

public TreeKind getTreeKind()
Identifies what kind of Tree this is.


getPosition

public javax.ide.model.java.source.util.SourcePosition getPosition()
Gets the position of this Tree object.


isSynthetic

public boolean isSynthetic()
True if this Tree element corresponds to an actual source representation.


getOwningFile

public FileT getOwningFile()
Gets the owning FileT.


getParent

public Tree getParent()
Gets the parent Tree to this.


getChildren

public java.util.List getChildren()
Gets the list of children Trees.


getSiblings

public java.util.ListIterator getSiblings()
Gets a ListIterator for this Tree's siblings.


accept

public void accept(javax.ide.model.java.source.util.TreeTraversal t)
Visits this element and its children (as determined by getChildren() 55 ).


accept

public void accept(javax.ide.model.java.source.util.TreeVisitor v)
Visits this element.


getSiblingBefore

public Tree getSiblingBefore()
Gets the sibling before this.

This operation currently performs in time proportional to the number of siblings this element has. That is, this is not a fast operation.


getSiblingAfter

public Tree getSiblingAfter()
Gets the sibling after this.

This operation currently performs in time proportional to the number of siblings this element has. That is, this is not a fast operation.


cloneSelf

public Tree cloneSelf(FileT targetFile)
Performs a deep-copy of this Tree but attached to the input FileT. If this element has children, then the clone of this element will have, as its children, clones of this element's children.

Properties are not copied.

Cloning a FileT in this manner results in an UnsupportedOperationException. To clone a FileT, please use TreeManager.cloneSourceFile(FileT,FileT)>TreeManager.cloneSourceFile(FileT,FileT) 55 .


addSelf

public void addSelf(Tree parent)
Performs an add (usually append) of this element to the parent. Insertion point is left to the discretion of the implementation.


addSelf

public void addSelf(Tree sibling,
                    boolean before)
Performs an add of this element to the parent of the input sibling.


addSelfBefore

public void addSelfBefore(Tree sibling)

addSelfAfter

public void addSelfAfter(Tree sibling)

replaceSelf

public void replaceSelf(Tree newElement)
Performs a set of this element with the newElement.


removeSelf

public void removeSelf()
Performs a remove of this element from its parent.


getProperty

public java.lang.Object getProperty(java.lang.String key)
Gets the property saved with the given key, null if none. To prevent collisions, clients should pick keys that start with the calling class's Class.getName()>Class.getName() 55 value.


setProperty

public java.lang.Object setProperty(java.lang.String key,
                                    java.lang.Object data)
Stores the input property. Overwrites any property stored under the same key.


clearProperty

public void clearProperty(java.lang.String key)
Nulls out the property stored with the given key.