Class NullnessAnnotatedTypeFactory.NullnessPropagationTreeAnnotator
java.lang.Object
com.sun.source.util.SimpleTreeVisitor<Void,AnnotatedTypeMirror>
org.checkerframework.framework.type.treeannotator.TreeAnnotator
org.checkerframework.framework.type.treeannotator.PropagationTreeAnnotator
org.checkerframework.checker.nullness.NullnessAnnotatedTypeFactory.NullnessPropagationTreeAnnotator
- All Implemented Interfaces:
TreeVisitor<Void,
AnnotatedTypeMirror>
- Enclosing class:
- NullnessAnnotatedTypeFactory
protected static class NullnessAnnotatedTypeFactory.NullnessPropagationTreeAnnotator
extends PropagationTreeAnnotator
Nullness doesn't call propagation on binary and unary because the result is always @Initialized
(the default qualifier).
Would this be valid to move into CommitmentTreeAnnotator.
-
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
ConstructorDescriptionNullnessPropagationTreeAnnotator
(AnnotatedTypeFactory atypeFactory) Create the NullnessPropagationTreeAnnotator. -
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.visitTypeCast
(TypeCastTree tree, AnnotatedTypeMirror type) visitUnary
(UnaryTree tree, AnnotatedTypeMirror type) Methods inherited from class org.checkerframework.framework.type.treeannotator.PropagationTreeAnnotator
visitCompoundAssignment, visitNewArray
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, visitIdentifier, visitIf, visitImport, visitInstanceOf, visitIntersectionType, visitLabeledStatement, visitLambdaExpression, visitLiteral, visitMemberReference, visitMemberSelect, visitMethodInvocation, visitModifiers, visitModule, visitNewClass, visitOpens, visitOther, visitPackage, visitParameterizedType, visitParenthesized, visitParenthesizedPattern, visitPrimitiveType, visitProvides, visitRequires, visitReturn, visitSwitch, visitSwitchExpression, visitSynchronized, visitThrow, visitTry, visitTypeParameter, visitUnionType, visitUses, visitVariable, visitWhileLoop, visitWildcard, visitYield
-
Constructor Details
-
NullnessPropagationTreeAnnotator
Create the NullnessPropagationTreeAnnotator.
-
-
Method Details
-
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.)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.- Specified by:
visitBinary
in interfaceTreeVisitor<Void,
AnnotatedTypeMirror> - Overrides:
visitBinary
in classPropagationTreeAnnotator
-
visitUnary
- Specified by:
visitUnary
in interfaceTreeVisitor<Void,
AnnotatedTypeMirror> - Overrides:
visitUnary
in classPropagationTreeAnnotator
-
visitTypeCast
- Specified by:
visitTypeCast
in interfaceTreeVisitor<Void,
AnnotatedTypeMirror> - Overrides:
visitTypeCast
in classPropagationTreeAnnotator
-