org.netbeans.api.jackpot
Class TreeMatcher
java.lang.Object
org.netbeans.api.jackpot.TreeMatcher
public final class TreeMatcher
- extends Object
Determines whether two trees deeply match each other, using a
fast-fail algorithm. Trees are deblocked before comparison; for
example, the tree for "if (test) { return; }" will match
"if (test) return;".
- See Also:
QueryOperations.deblock(com.sun.source.tree.Tree)
|
Method Summary |
static boolean |
matches(List<? extends Tree> a,
List<? extends Tree> b)
Returns true if two tree lists match. |
static boolean |
matches(Tree a,
Tree b)
Returns true if two trees match. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TreeMatcher
public TreeMatcher()
matches
public static final boolean matches(Tree a,
Tree b)
- Returns true if two trees match.
- Parameters:
a - the first treeb - the tree to compare to a
- Returns:
- true if the trees match
matches
public static boolean matches(List<? extends Tree> a,
List<? extends Tree> b)
- Returns true if two tree lists match.
- Parameters:
a - the first tree listb - the tree list to compare to a
- Returns:
- true if the tree lists match