Class AnnotationEqualityVisitor
java.lang.Object
com.github.javaparser.ast.visitor.VoidVisitorAdapter<com.github.javaparser.ast.Node>
org.checkerframework.framework.ajava.DoubleJavaParserVisitor
org.checkerframework.framework.ajava.AnnotationEqualityVisitor
- All Implemented Interfaces:
- com.github.javaparser.ast.visitor.VoidVisitor<com.github.javaparser.ast.Node>
Given two ASTs representing the same Java file that may differ in annotations, tests if they have
 the same annotations.
 
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 SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescription<T extends com.github.javaparser.ast.Node>
 voiddefaultAction(T node1, T node2) Default action performed on all pairs of nodes from matching ASTs.booleanReturns whether a visited pair of nodes differed in annotations.@Nullable com.github.javaparser.ast.nodeTypes.NodeWithAnnotations<?>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<?>If a visited pair of nodes has had mismatched annotations, returns the node from the second AST where annotations differed, or null otherwise.Methods inherited from class org.checkerframework.framework.ajava.DoubleJavaParserVisitorvisit, 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, visit, visitMethods inherited from class com.github.javaparser.ast.visitor.VoidVisitorAdaptervisit, visit, visit
- 
Constructor Details- 
AnnotationEqualityVisitorpublic AnnotationEqualityVisitor()Constructs anAnnotationEqualityVisitor.
 
- 
- 
Method Details- 
getAnnotationsMatchpublic boolean getAnnotationsMatch()Returns whether a visited pair of nodes differed in annotations.- Returns:
- true if some visited pair of nodes differed in annotations
 
- 
getMismatchedNode1If a visited pair of nodes has had mismatched annotations, returns the node from the first AST where annotations differed, or null otherwise.- Returns:
- the node from the first AST with differing annotations or null
 
- 
getMismatchedNode2If a visited pair of nodes has had mismatched annotations, returns the node from the second AST where annotations differed, or null otherwise.- Returns:
- the node from the second AST with differing annotations or null
 
- 
defaultActionpublic <T extends com.github.javaparser.ast.Node> void defaultAction(T node1, T node2) Description copied from class:DoubleJavaParserVisitorDefault action performed on all pairs of nodes from matching ASTs.- Specified by:
- defaultActionin class- DoubleJavaParserVisitor
- Type Parameters:
- T- the Node type of- node1and- node2
- Parameters:
- node1- first node in pair
- node2- second node in pair
 
 
-