public class AnnotationEqualityVisitor extends DoubleJavaParserVisitor
To use this class, have the first AST node accept the visitor and pass the second AST node as
the second argument. Then, check getAnnotationsMatch()
.
Constructor and Description |
---|
AnnotationEqualityVisitor()
Constructs an
AnnotationEqualityVisitor . |
Modifier and Type | Method and Description |
---|---|
<T extends com.github.javaparser.ast.Node> |
defaultAction(T node1,
T node2)
Default action performed on all pairs of nodes from matching ASTs.
|
boolean |
getAnnotationsMatch()
Returns whether a visited pair of nodes differed in annotations.
|
@Nullable com.github.javaparser.ast.nodeTypes.NodeWithAnnotations<?> |
getMismatchedNode1()
If a visited pair of nodes has had mismatched annotations, returns the node from the first AST
where annotations differed, or null otherwise.
|
@Nullable com.github.javaparser.ast.nodeTypes.NodeWithAnnotations<?> |
getMismatchedNode2()
If a visited pair of nodes has had mismatched annotations, returns the node from the second AST
where annotations differed, or null otherwise.
|
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
public AnnotationEqualityVisitor()
AnnotationEqualityVisitor
.public boolean getAnnotationsMatch()
public @Nullable com.github.javaparser.ast.nodeTypes.NodeWithAnnotations<?> getMismatchedNode1()
public @Nullable com.github.javaparser.ast.nodeTypes.NodeWithAnnotations<?> getMismatchedNode2()
public <T extends com.github.javaparser.ast.Node> void defaultAction(T node1, T node2)
DoubleJavaParserVisitor
defaultAction
in class DoubleJavaParserVisitor
T
- the Node type of node1
and node2
node1
- first node in pairnode2
- second node in pair