Class TypeAnnotationMover
java.lang.Object
com.github.javaparser.ast.visitor.VoidVisitorAdapter<Void>
org.checkerframework.framework.ajava.TypeAnnotationMover
- All Implemented Interfaces:
com.github.javaparser.ast.visitor.VoidVisitor<Void>
Moves annotations in a JavaParser AST from declaration position onto the types they correspond
to.
When parsing a method or field such as @Tainted String myField
, JavaParser puts all
annotations on the declaration.
For each non-declaration annotation on a method or field declaration, this class moves it to
the type position. A non-declaration annotation is one with a TYPE_USE
target but no
declaration target.
-
Constructor Summary
ConstructorDescriptionTypeAnnotationMover
(Map<String, TypeElement> allAnnotations, Elements elements) Constructs aTypeAnnotationMover
. -
Method Summary
Methods inherited from class com.github.javaparser.ast.visitor.VoidVisitorAdapter
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, visit, visit, visit
-
Constructor Details
-
TypeAnnotationMover
Constructs aTypeAnnotationMover
.- Parameters:
allAnnotations
- the annotations imported by the file, as a mapping from annotation name to TypeElement. There should be two entries for each annotation: the annotation's simple name and its fully-qualified name both mapped to its TypeElement.elements
- the Element utilities
-
-
Method Details
-
visit
-
visit
-