com.sun.javafx.api.tree
Class JavaFXTreePath

java.lang.Object
  extended by com.sun.javafx.api.tree.JavaFXTreePath
All Implemented Interfaces:
java.lang.Iterable<Tree>

public class JavaFXTreePath
extends java.lang.Object
implements java.lang.Iterable<Tree>

A path of tree nodes, typically used to represent the sequence of ancestor nodes of a tree node up to the top level UnitTree node.

Since:
1.6

Constructor Summary
JavaFXTreePath(JavaFXTreePath p, Tree t)
          Creates a TreePath for a child node.
JavaFXTreePath(UnitTree t)
          Creates a TreePath for a root node.
 
Method Summary
 UnitTree getCompilationUnit()
          Get the compilation unit associated with this path.
 Tree getLeaf()
          Get the leaf node for this path.
 JavaFXTreePath getParentPath()
          Get the path for the enclosing node, or null if there is no enclosing node.
static JavaFXTreePath getPath(JavaFXTreePath path, Tree target)
          Gets a tree path for a tree node within a subtree identified by a TreePath object.
static JavaFXTreePath getPath(UnitTree unit, Tree target)
          Gets a tree path for a tree node within a compilation unit.
 java.util.Iterator<Tree> iterator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaFXTreePath

public JavaFXTreePath(UnitTree t)
Creates a TreePath for a root node.


JavaFXTreePath

public JavaFXTreePath(JavaFXTreePath p,
                      Tree t)
Creates a TreePath for a child node.

Method Detail

getPath

public static JavaFXTreePath getPath(UnitTree unit,
                                     Tree target)
Gets a tree path for a tree node within a compilation unit.

Returns:
null if the node is not found

getPath

public static JavaFXTreePath getPath(JavaFXTreePath path,
                                     Tree target)
Gets a tree path for a tree node within a subtree identified by a TreePath object.

Returns:
null if the node is not found

getCompilationUnit

public UnitTree getCompilationUnit()
Get the compilation unit associated with this path.


getLeaf

public Tree getLeaf()
Get the leaf node for this path.


getParentPath

public JavaFXTreePath getParentPath()
Get the path for the enclosing node, or null if there is no enclosing node.


iterator

public java.util.Iterator<Tree> iterator()
Specified by:
iterator in interface java.lang.Iterable<Tree>