protected class NullnessAnnotatedTypeFactory.NullnessTreeAnnotator extends TreeAnnotator
atypeFactory
DEFAULT_VALUE
Constructor and Description |
---|
NullnessTreeAnnotator(NullnessAnnotatedTypeFactory atypeFactory) |
Modifier and Type | Method and Description |
---|---|
Void |
visitBinary(BinaryTree node,
AnnotatedTypeMirror type)
When overriding this method, getAnnotatedType on the left and right operands should only be
called when absolutely necessary.
|
Void |
visitCompoundAssignment(CompoundAssignmentTree node,
AnnotatedTypeMirror type) |
Void |
visitIdentifier(IdentifierTree node,
AnnotatedTypeMirror type) |
Void |
visitMemberSelect(MemberSelectTree node,
AnnotatedTypeMirror type) |
Void |
visitNewClass(NewClassTree node,
AnnotatedTypeMirror type) |
Void |
visitUnary(UnaryTree node,
AnnotatedTypeMirror type) |
Void |
visitVariable(VariableTree 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, visitIf, visitImport, visitInstanceOf, visitIntersectionType, visitLabeledStatement, visitLambdaExpression, visitLiteral, visitMemberReference, visitMethodInvocation, visitModifiers, visitNewArray, visitOther, visitParameterizedType, visitParenthesized, visitPrimitiveType, visitReturn, visitSwitch, visitSynchronized, visitThrow, visitTry, visitTypeCast, visitTypeParameter, visitUnionType, visitWhileLoop, visitWildcard
public NullnessTreeAnnotator(NullnessAnnotatedTypeFactory atypeFactory)
public Void visitMemberSelect(MemberSelectTree node, AnnotatedTypeMirror type)
visitMemberSelect
in interface TreeVisitor<Void,AnnotatedTypeMirror>
visitMemberSelect
in class SimpleTreeVisitor<Void,AnnotatedTypeMirror>
public Void visitVariable(VariableTree node, AnnotatedTypeMirror type)
visitVariable
in interface TreeVisitor<Void,AnnotatedTypeMirror>
visitVariable
in class SimpleTreeVisitor<Void,AnnotatedTypeMirror>
public Void visitIdentifier(IdentifierTree node, AnnotatedTypeMirror type)
visitIdentifier
in interface TreeVisitor<Void,AnnotatedTypeMirror>
visitIdentifier
in class SimpleTreeVisitor<Void,AnnotatedTypeMirror>
public Void visitBinary(BinaryTree node, AnnotatedTypeMirror type)
TreeAnnotator
If a checker's performance is still too slow, the types of binary trees could be computed
in a subclass of CFTransfer
. When computing the
types in a transfer, look up the value in the store rather than the AnnotatedTypeFactory.
Then this method should annotate binary trees with top so that the type applied in the
transfer is always a subtype of the type the AnnotatedTypeFactory computes.
visitBinary
in interface TreeVisitor<Void,AnnotatedTypeMirror>
visitBinary
in class TreeAnnotator
public Void visitCompoundAssignment(CompoundAssignmentTree node, AnnotatedTypeMirror type)
visitCompoundAssignment
in interface TreeVisitor<Void,AnnotatedTypeMirror>
visitCompoundAssignment
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 visitNewClass(NewClassTree node, AnnotatedTypeMirror type)
visitNewClass
in interface TreeVisitor<Void,AnnotatedTypeMirror>
visitNewClass
in class SimpleTreeVisitor<Void,AnnotatedTypeMirror>