public class PropagationTreeAnnotator extends TreeAnnotator
PropagationTreeAnnotator
adds qualifiers to types where the resulting
type is a function of an input type, e.g. the result of a binary operation
is a LUB of the type of expressions in the binary operation.
PropagationTreeAnnotator
is generally ran first by ListTreeAnnotator
since the trees it handles are not usually targets of @implicit for.
PropagationTreeAnnotator
does not traverse trees deeply by default.TreeAnnotator
atypeFactory
DEFAULT_VALUE
Constructor and Description |
---|
PropagationTreeAnnotator(AnnotatedTypeFactory atypeFactory)
Creates a
ImplicitsTypeAnnotator from the given checker, using that checker's
type hierarchy. |
Modifier and Type | Method and Description |
---|---|
Void |
visitBinary(BinaryTree node,
AnnotatedTypeMirror type) |
Void |
visitCompoundAssignment(CompoundAssignmentTree node,
AnnotatedTypeMirror type) |
Void |
visitNewArray(NewArrayTree tree,
AnnotatedTypeMirror type) |
Void |
visitTypeCast(TypeCastTree node,
AnnotatedTypeMirror type) |
Void |
visitUnary(UnaryTree node,
AnnotatedTypeMirror type) |
visitMethod
defaultAction, visit, visit, visitAnnotatedType, visitAnnotation, visitArrayAccess, visitArrayType, visitAssert, visitAssignment, visitBlock, visitBreak, visitCase, visitCatch, visitClass, visitCompilationUnit, visitConditionalExpression, visitContinue, visitDoWhileLoop, visitEmptyStatement, visitEnhancedForLoop, visitErroneous, visitExpressionStatement, visitForLoop, visitIdentifier, visitIf, visitImport, visitInstanceOf, visitIntersectionType, visitLabeledStatement, visitLambdaExpression, visitLiteral, visitMemberReference, visitMemberSelect, visitMethodInvocation, visitModifiers, visitNewClass, visitOther, visitParameterizedType, visitParenthesized, visitPrimitiveType, visitReturn, visitSwitch, visitSynchronized, visitThrow, visitTry, visitTypeParameter, visitUnionType, visitVariable, visitWhileLoop, visitWildcard
public PropagationTreeAnnotator(AnnotatedTypeFactory atypeFactory)
ImplicitsTypeAnnotator
from the given checker, using that checker's
type hierarchy.public Void visitNewArray(NewArrayTree tree, AnnotatedTypeMirror type)
visitNewArray
in interface TreeVisitor<Void,AnnotatedTypeMirror>
visitNewArray
in class SimpleTreeVisitor<Void,AnnotatedTypeMirror>
public Void visitCompoundAssignment(CompoundAssignmentTree node, AnnotatedTypeMirror type)
visitCompoundAssignment
in interface TreeVisitor<Void,AnnotatedTypeMirror>
visitCompoundAssignment
in class SimpleTreeVisitor<Void,AnnotatedTypeMirror>
public Void visitBinary(BinaryTree node, AnnotatedTypeMirror type)
visitBinary
in interface TreeVisitor<Void,AnnotatedTypeMirror>
visitBinary
in class SimpleTreeVisitor<Void,AnnotatedTypeMirror>
public Void visitUnary(UnaryTree node, AnnotatedTypeMirror type)
visitUnary
in interface TreeVisitor<Void,AnnotatedTypeMirror>
visitUnary
in class SimpleTreeVisitor<Void,AnnotatedTypeMirror>
public Void visitTypeCast(TypeCastTree node, AnnotatedTypeMirror type)
visitTypeCast
in interface TreeVisitor<Void,AnnotatedTypeMirror>
visitTypeCast
in class SimpleTreeVisitor<Void,AnnotatedTypeMirror>