FeaturesPluginsDocs & SupportCommunityPartners

org.netbeans.modules.jackpot/2 2 1

org.netbeans.api.jackpot
Class TreeMatcher

java.lang.Object
  extended by 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)

Constructor Summary
TreeMatcher()
           
 
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
 

Constructor Detail

TreeMatcher

public TreeMatcher()
Method Detail

matches

public static final boolean matches(Tree a,
                                    Tree b)
Returns true if two trees match.

Parameters:
a - the first tree
b - 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 list
b - the tree list to compare to a
Returns:
true if the tree lists match

org.netbeans.modules.jackpot/2 2 1

Built on April 6 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
Companion
Projects:
MySQL Database Server   Open JDK: an Open SourceJDK   GlassFish Community: an Open Source Application Server    Mobile & Embedded Community    Open Solaris   java.net - The Source for Java Technology Collaboration   Virtual Box - full virtualizer  Open ESB - The Open Enterprise Service Bus Powered by