Class NullnessAnnotatedTypeFactory.NullnessTreeAnnotator
java.lang.Object
com.sun.source.util.SimpleTreeVisitor<Void,AnnotatedTypeMirror>
org.checkerframework.framework.type.treeannotator.TreeAnnotator
org.checkerframework.checker.nullness.NullnessAnnotatedTypeFactory.NullnessTreeAnnotator
- All Implemented Interfaces:
TreeVisitor<Void,
AnnotatedTypeMirror>
- Enclosing class:
- NullnessAnnotatedTypeFactory
-
Field Summary
Fields inherited from class org.checkerframework.framework.type.treeannotator.TreeAnnotator
atypeFactory
Fields inherited from class com.sun.source.util.SimpleTreeVisitor
DEFAULT_VALUE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvisitBinary
(BinaryTree tree, AnnotatedTypeMirror type) When overriding this method, getAnnotatedType on the left and right operands should only be called when absolutely necessary.visitIdentifier
(IdentifierTree tree, AnnotatedTypeMirror type) visitMemberSelect
(MemberSelectTree tree, AnnotatedTypeMirror type) visitNewArray
(NewArrayTree tree, AnnotatedTypeMirror type) visitNewClass
(NewClassTree tree, AnnotatedTypeMirror type) visitUnary
(UnaryTree tree, AnnotatedTypeMirror type) visitVariable
(VariableTree tree, AnnotatedTypeMirror type) Methods inherited from class org.checkerframework.framework.type.treeannotator.TreeAnnotator
log, visitMethod
Methods inherited from class com.sun.source.util.SimpleTreeVisitor
defaultAction, visit, visit, visitAnnotatedType, visitAnnotation, visitArrayAccess, visitArrayType, visitAssert, visitAssignment, visitBindingPattern, visitBlock, visitBreak, visitCase, visitCatch, visitClass, visitCompilationUnit, visitConditionalExpression, visitContinue, visitDefaultCaseLabel, visitDoWhileLoop, visitEmptyStatement, visitEnhancedForLoop, visitErroneous, visitExports, visitExpressionStatement, visitForLoop, visitGuardedPattern, visitIf, visitImport, visitInstanceOf, visitIntersectionType, visitLabeledStatement, visitLambdaExpression, visitLiteral, visitMemberReference, visitModifiers, visitModule, visitOpens, visitOther, visitPackage, visitParameterizedType, visitParenthesized, visitParenthesizedPattern, visitPrimitiveType, visitProvides, visitRequires, visitReturn, visitSwitch, visitSwitchExpression, visitSynchronized, visitThrow, visitTry, visitTypeCast, visitTypeParameter, visitUnionType, visitUses, visitWhileLoop, visitWildcard, visitYield
-
Constructor Details
-
NullnessTreeAnnotator
-
-
Method Details
-
visitMemberSelect
- Specified by:
visitMemberSelect
in interfaceTreeVisitor<Void,
AnnotatedTypeMirror> - Overrides:
visitMemberSelect
in classSimpleTreeVisitor<Void,
AnnotatedTypeMirror>
-
visitVariable
- Specified by:
visitVariable
in interfaceTreeVisitor<Void,
AnnotatedTypeMirror> - Overrides:
visitVariable
in classSimpleTreeVisitor<Void,
AnnotatedTypeMirror>
-
visitIdentifier
- Specified by:
visitIdentifier
in interfaceTreeVisitor<Void,
AnnotatedTypeMirror> - Overrides:
visitIdentifier
in classSimpleTreeVisitor<Void,
AnnotatedTypeMirror>
-
visitBinary
Description copied from class:TreeAnnotator
When overriding this method, getAnnotatedType on the left and right operands should only be called when absolutely necessary. Otherwise, the checker will be very slow on heavily nested binary trees. (For example, a + b + c + d + e + f + g + h.)One approach is to perform work in this method only if
type.hasPrimaryAnnotationInHierarchy(...)
returns false.If a checker's performance is still too slow:
- Compute the types of binary trees in a subclass of
CFTransfer
; look up the value in the store rather than the AnnotatedTypeFactory. - This method (
TreeAnnotator.visitBinary
) should annotate binary trees with top so that the type applied in the transfer is always a subtype of the type the AnnotatedTypeFactory computes.
- Specified by:
visitBinary
in interfaceTreeVisitor<Void,
AnnotatedTypeMirror> - Overrides:
visitBinary
in classTreeAnnotator
- Compute the types of binary trees in a subclass of
-
visitCompoundAssignment
- Specified by:
visitCompoundAssignment
in interfaceTreeVisitor<Void,
AnnotatedTypeMirror> - Overrides:
visitCompoundAssignment
in classSimpleTreeVisitor<Void,
AnnotatedTypeMirror>
-
visitUnary
- Specified by:
visitUnary
in interfaceTreeVisitor<Void,
AnnotatedTypeMirror> - Overrides:
visitUnary
in classSimpleTreeVisitor<Void,
AnnotatedTypeMirror>
-
visitNewClass
- Specified by:
visitNewClass
in interfaceTreeVisitor<Void,
AnnotatedTypeMirror> - Overrides:
visitNewClass
in classSimpleTreeVisitor<Void,
AnnotatedTypeMirror>
-
visitNewArray
- Specified by:
visitNewArray
in interfaceTreeVisitor<Void,
AnnotatedTypeMirror> - Overrides:
visitNewArray
in classSimpleTreeVisitor<Void,
AnnotatedTypeMirror>
-
visitMethodInvocation
- Specified by:
visitMethodInvocation
in interfaceTreeVisitor<Void,
AnnotatedTypeMirror> - Overrides:
visitMethodInvocation
in classSimpleTreeVisitor<Void,
AnnotatedTypeMirror>
-