checkers.types
Class TreeAnnotator
java.lang.Object
com.sun.source.util.SimpleTreeVisitor<Void,AnnotatedTypeMirror>
checkers.types.TreeAnnotator
- All Implemented Interfaces:
- TreeVisitor<Void,AnnotatedTypeMirror>
public class TreeAnnotator
- extends SimpleTreeVisitor<Void,AnnotatedTypeMirror>
Adds annotations to a type based on the contents of a tree. By default, this
class honors the ImplicitFor
annotation and applies implicit
annotations specified by ImplicitFor
for any tree whose visitor is
not overridden or does not call super
; it is designed to be invoked
from
AnnotatedTypeFactory.annotateImplicit(Element, AnnotatedTypeMirror)
and AnnotatedTypeFactory.annotateImplicit(Tree, AnnotatedTypeMirror)
.
TreeAnnotator
does not traverse trees deeply by default.
Methods inherited from class com.sun.source.util.SimpleTreeVisitor |
visit, visit, visitAnnotatedType, visitAnnotation, visitArrayAccess, visitArrayType, visitAssert, visitAssignment, visitBinary, visitBlock, visitBreak, visitCase, visitCatch, visitClass, visitCompilationUnit, visitCompoundAssignment, visitConditionalExpression, visitContinue, visitDoWhileLoop, visitEmptyStatement, visitEnhancedForLoop, visitErroneous, visitExpressionStatement, visitForLoop, visitIdentifier, visitIf, visitImport, visitInstanceOf, visitLabeledStatement, visitLiteral, visitMemberSelect, visitMethod, visitMethodInvocation, visitModifiers, visitNewArray, visitNewClass, visitOther, visitParameterizedType, visitParenthesized, visitPrimitiveType, visitReturn, visitSwitch, visitSynchronized, visitThrow, visitTry, visitTypeCast, visitTypeParameter, visitUnary, visitVariable, visitWhileLoop, visitWildcard |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TreeAnnotator
public TreeAnnotator(BaseTypeChecker checker)
- Creates a
TypeAnnotator
from the given checker, using that checker's
TypeQualifiers
annotation to determine the annotations that are
in the type hierarchy.
- Parameters:
checker
- the type checker to which this annotator belongs
defaultAction
public Void defaultAction(Tree tree,
AnnotatedTypeMirror type)
- Overrides:
defaultAction
in class SimpleTreeVisitor<Void,AnnotatedTypeMirror>