|
|||||||||
| Home >> All >> org >> eclipse >> jdt >> core >> [ dom overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.eclipse.jdt.core.dom
Class ASTMatcher

java.lang.Objectorg.eclipse.jdt.core.dom.ASTMatcher
- public class ASTMatcher
- extends java.lang.Object
Concrete superclass and default implementation of an AST subtree matcher.
For example, to compute whether two ASTs subtrees are structurally
isomorphic, use n1.subtreeMatch(new ASTMatcher(), n2) where
n1 and n2 are the AST root nodes of the subtrees.
For each different concrete AST node type public boolean match( method
that matches the given node against another object (typically another
AST node, although this is not essential). The default implementations
provided by this class tests whether the other object is a node of the
same type with structurally isomorphic child subtrees. For nodes with
list-valued properties, the child nodes within the list are compared in
order. For nodes with multiple properties, the child nodes are compared
in the order that most closely corresponds to the lexical reading order
of the source program. For instance, for a type declaration node, the
child ordering is: name, superclass, superinterfaces, and body
declarations.
Subclasses may override (extend or reimplement) some or all of the
match methods in order to define more specialized subtree
matchers.
- Since:
- 2.0
| Field Summary | |
private boolean |
matchDocTags
Indicates whether doc tags should be matched. |
| Constructor Summary | |
ASTMatcher()
Creates a new AST matcher instance. |
|
ASTMatcher(boolean matchDocTags)
Creates a new AST matcher instance. |
|
| Method Summary | |
private boolean |
compareDeprecatedComment(Javadoc first,
Javadoc second)
Deprecated. mark deprecated to hide deprecated usage |
boolean |
match(AnnotationTypeDeclaration node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(AnnotationTypeMemberDeclaration node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(AnonymousClassDeclaration node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(ArrayAccess node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(ArrayCreation node,
java.lang.Object other)
Returns whether the given node and the other object object match. |
boolean |
match(ArrayInitializer node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(ArrayType node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(AssertStatement node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(Assignment node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(BlockComment node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(Block node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(BooleanLiteral node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(BreakStatement node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(CastExpression node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(CatchClause node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(CharacterLiteral node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(ClassInstanceCreation node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(CompilationUnit node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(ConditionalExpression node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(ConstructorInvocation node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(ContinueStatement node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(DoStatement node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(EmptyStatement node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(EnhancedForStatement node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(EnumConstantDeclaration node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(EnumDeclaration node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(ExpressionStatement node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(FieldAccess node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(FieldDeclaration node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(ForStatement node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(IfStatement node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(ImportDeclaration node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(InfixExpression node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(Initializer node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(InstanceofExpression node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(Javadoc node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(LabeledStatement node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(LineComment node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(MarkerAnnotation node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(MemberRef node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(MemberValuePair node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(MethodDeclaration node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(MethodInvocation node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(MethodRef node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(MethodRefParameter node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(Modifier node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(NormalAnnotation node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(NullLiteral node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(NumberLiteral node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(PackageDeclaration node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(ParameterizedType node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(ParenthesizedExpression node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(PostfixExpression node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(PrefixExpression node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(PrimitiveType node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(QualifiedName node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(QualifiedType node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(ReturnStatement node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(SimpleName node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(SimpleType node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(SingleMemberAnnotation node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(SingleVariableDeclaration node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(StringLiteral node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(SuperConstructorInvocation node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(SuperFieldAccess node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(SuperMethodInvocation node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(SwitchCase node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(SwitchStatement node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(SynchronizedStatement node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(TagElement node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(TextElement node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(ThisExpression node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(ThrowStatement node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(TryStatement node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(TypeDeclaration node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(TypeDeclarationStatement node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(TypeLiteral node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(TypeParameter node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(VariableDeclarationExpression node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(VariableDeclarationFragment node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(VariableDeclarationStatement node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(WhileStatement node,
java.lang.Object other)
Returns whether the given node and the other object match. |
boolean |
match(WildcardType node,
java.lang.Object other)
Returns whether the given node and the other object match. |
static boolean |
safeEquals(java.lang.Object o1,
java.lang.Object o2)
Returns whether the given objects are equal according to equals. |
boolean |
safeSubtreeListMatch(java.util.List list1,
java.util.List list2)
Returns whether the given lists of AST nodes match pair wise according to ASTNode.subtreeMatch. |
boolean |
safeSubtreeMatch(java.lang.Object node1,
java.lang.Object node2)
Returns whether the given nodes match according to AST.subtreeMatch. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
matchDocTags
private boolean matchDocTags
- Indicates whether doc tags should be matched.
- Since:
- 3.0
| Constructor Detail |
ASTMatcher
public ASTMatcher()
- Creates a new AST matcher instance.
For backwards compatibility, the matcher ignores tag elements below doc comments by default. Use ASTMatcher(true) 55 for a matcher that compares doc tags by default.
ASTMatcher
public ASTMatcher(boolean matchDocTags)
- Creates a new AST matcher instance.
- Since:
- 3.0
| Method Detail |
safeSubtreeListMatch
public final boolean safeSubtreeListMatch(java.util.List list1, java.util.List list2)
- Returns whether the given lists of AST nodes match pair wise according
to
ASTNode.subtreeMatch.Note that this is a convenience method, useful for writing recursive subtree matchers.
safeSubtreeMatch
public final boolean safeSubtreeMatch(java.lang.Object node1, java.lang.Object node2)
- Returns whether the given nodes match according to
AST.subtreeMatch. Returnsfalseif one or the other of the nodes arenull. Returnstrueif both nodes arenull.Note that this is a convenience method, useful for writing recursive subtree matchers.
safeEquals
public static boolean safeEquals(java.lang.Object o1, java.lang.Object o2)
- Returns whether the given objects are equal according to
equals. Returnsfalseif either node isnull.
match
public boolean match(AnnotationTypeDeclaration node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
- Since:
- 3.0
match
public boolean match(AnnotationTypeMemberDeclaration node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
- Since:
- 3.0
match
public boolean match(AnonymousClassDeclaration node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(ArrayAccess node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(ArrayCreation node, java.lang.Object other)
- Returns whether the given node and the other object object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(ArrayInitializer node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(ArrayType node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(AssertStatement node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(Assignment node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(Block node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(BlockComment node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type. Subclasses may override this method as needed.
- Since:
- 3.0
match
public boolean match(BooleanLiteral node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(BreakStatement node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(CastExpression node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(CatchClause node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(CharacterLiteral node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(ClassInstanceCreation node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(CompilationUnit node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(ConditionalExpression node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(ConstructorInvocation node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(ContinueStatement node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(DoStatement node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(EmptyStatement node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(EnhancedForStatement node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
- Since:
- 3.0
match
public boolean match(EnumConstantDeclaration node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
Note: This API element is only needed for dealing with Java code that uses new language features of J2SE 1.5. It is included in anticipation of J2SE 1.5 support, which is planned for the next release of Eclipse after 3.0, and may change slightly before reaching its final form.
- Since:
- 3.0
match
public boolean match(EnumDeclaration node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
- Since:
- 3.0
match
public boolean match(ExpressionStatement node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(FieldAccess node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(FieldDeclaration node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(ForStatement node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(IfStatement node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(ImportDeclaration node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(InfixExpression node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(InstanceofExpression node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(Initializer node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(Javadoc node, java.lang.Object other)
- Returns whether the given node and the other object match.
Unlike other node types, the behavior of the default implementation is controlled by a constructor-supplied parameter ASTMatcher(boolean) 55 which is
falseif not specified. When this parameter istrue, the implementation tests whether the other object is also aJavadocwith structurally isomorphic child subtrees; the comment string (Javadoc.getComment 55 ) is ignored. Conversely, when the parameter isfalse, the implementation tests whether the other object is also aJavadocwith exactly the same comment string; the tag elements (Javadoc.tags 55 are ignored. Subclasses may reimplement.
compareDeprecatedComment
private boolean compareDeprecatedComment(Javadoc first, Javadoc second)
- Deprecated. mark deprecated to hide deprecated usage
- Return whether the deprecated comment strings of the given java doc are equals.
Note the only purpose of this method is to hide deprecated warnings.
- Return whether the deprecated comment strings of the given java doc are equals.
match
public boolean match(LabeledStatement node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(LineComment node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type. Subclasses may override this method as needed.
- Since:
- 3.0
match
public boolean match(MarkerAnnotation node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
- Since:
- 3.0
match
public boolean match(MemberRef node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
- Since:
- 3.0
match
public boolean match(MemberValuePair node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
- Since:
- 3.0
match
public boolean match(MethodRef node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
- Since:
- 3.0
match
public boolean match(MethodRefParameter node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
- Since:
- 3.0
match
public boolean match(MethodDeclaration node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
Note that extra array dimensions are compared since they are an important part of the method declaration.
Note that the method return types are compared even for constructor declarations.
match
public boolean match(MethodInvocation node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(Modifier node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
- Since:
- 3.0
match
public boolean match(NormalAnnotation node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
- Since:
- 3.0
match
public boolean match(NullLiteral node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(NumberLiteral node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(PackageDeclaration node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(ParameterizedType node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
- Since:
- 3.0
match
public boolean match(ParenthesizedExpression node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(PostfixExpression node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(PrefixExpression node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(PrimitiveType node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(QualifiedName node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(QualifiedType node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
- Since:
- 3.0
match
public boolean match(ReturnStatement node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(SimpleName node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(SimpleType node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(SingleMemberAnnotation node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
- Since:
- 3.0
match
public boolean match(SingleVariableDeclaration node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
Note that extra array dimensions and the variable arity flag are compared since they are both important parts of the declaration.
match
public boolean match(StringLiteral node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(SuperConstructorInvocation node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(SuperFieldAccess node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(SuperMethodInvocation node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(SwitchCase node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(SwitchStatement node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(SynchronizedStatement node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(TagElement node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
- Since:
- 3.0
match
public boolean match(TextElement node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
- Since:
- 3.0
match
public boolean match(ThisExpression node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(ThrowStatement node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(TryStatement node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(TypeDeclaration node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(TypeDeclarationStatement node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(TypeLiteral node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(TypeParameter node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
- Since:
- 3.0
match
public boolean match(VariableDeclarationExpression node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(VariableDeclarationFragment node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
Note that extra array dimensions are compared since they are an important part of the type of the variable.
match
public boolean match(VariableDeclarationStatement node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(WhileStatement node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
match
public boolean match(WildcardType node, java.lang.Object other)
- Returns whether the given node and the other object match.
The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed.
JAVADOC
org.eclipse.jdt.core.dom.ASTMatcher