Class InitializationFieldAccessTreeAnnotator
- java.lang.Object
-
- com.sun.source.util.SimpleTreeVisitor<java.lang.Void,AnnotatedTypeMirror>
-
- org.checkerframework.framework.type.treeannotator.TreeAnnotator
-
- org.checkerframework.checker.initialization.InitializationFieldAccessTreeAnnotator
-
- All Implemented Interfaces:
com.sun.source.tree.TreeVisitor<java.lang.Void,AnnotatedTypeMirror>
public class InitializationFieldAccessTreeAnnotator extends TreeAnnotator
Part of the freedom-before-commitment type system.This annotator should be added to
GenericAnnotatedTypeFactory.createTreeAnnotator()
for the target checker. It ensures that the fields of an uninitialized receiver have the top type in the parent checker's hierarchy.
-
-
Field Summary
-
Fields inherited from class org.checkerframework.framework.type.treeannotator.TreeAnnotator
atypeFactory
-
-
Constructor Summary
Constructors Constructor Description InitializationFieldAccessTreeAnnotator(GenericAnnotatedTypeFactory<?,?,?,?> atypeFactory)
Creates a new CommitmentFieldAccessTreeAnnotator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Void
visitIdentifier(com.sun.source.tree.IdentifierTree tree, AnnotatedTypeMirror p)
java.lang.Void
visitMemberSelect(com.sun.source.tree.MemberSelectTree tree, AnnotatedTypeMirror p)
-
Methods inherited from class org.checkerframework.framework.type.treeannotator.TreeAnnotator
log, visitBinary, visitMethod
-
Methods inherited from class com.sun.source.util.SimpleTreeVisitor
defaultAction, visit, visit, visitAnnotatedType, visitAnnotation, visitArrayAccess, visitArrayType, visitAssert, visitAssignment, visitBlock, visitBreak, visitCase, visitCatch, visitClass, visitCompilationUnit, visitCompoundAssignment, visitConditionalExpression, visitContinue, visitDoWhileLoop, visitEmptyStatement, visitEnhancedForLoop, visitErroneous, visitExports, visitExpressionStatement, visitForLoop, visitIf, visitImport, visitInstanceOf, visitIntersectionType, visitLabeledStatement, visitLambdaExpression, visitLiteral, visitMemberReference, visitMethodInvocation, visitModifiers, visitModule, visitNewArray, visitNewClass, visitOpens, visitOther, visitPackage, visitParameterizedType, visitParenthesized, visitPrimitiveType, visitProvides, visitRequires, visitReturn, visitSwitch, visitSynchronized, visitThrow, visitTry, visitTypeCast, visitTypeParameter, visitUnary, visitUnionType, visitUses, visitVariable, visitWhileLoop, visitWildcard
-
-
-
-
Constructor Detail
-
InitializationFieldAccessTreeAnnotator
public InitializationFieldAccessTreeAnnotator(GenericAnnotatedTypeFactory<?,?,?,?> atypeFactory)
Creates a new CommitmentFieldAccessTreeAnnotator.- Parameters:
atypeFactory
- the type factory belonging to the init checker's parent
-
-
Method Detail
-
visitIdentifier
public java.lang.Void visitIdentifier(com.sun.source.tree.IdentifierTree tree, AnnotatedTypeMirror p)
- Specified by:
visitIdentifier
in interfacecom.sun.source.tree.TreeVisitor<java.lang.Void,AnnotatedTypeMirror>
- Overrides:
visitIdentifier
in classcom.sun.source.util.SimpleTreeVisitor<java.lang.Void,AnnotatedTypeMirror>
-
visitMemberSelect
public java.lang.Void visitMemberSelect(com.sun.source.tree.MemberSelectTree tree, AnnotatedTypeMirror p)
- Specified by:
visitMemberSelect
in interfacecom.sun.source.tree.TreeVisitor<java.lang.Void,AnnotatedTypeMirror>
- Overrides:
visitMemberSelect
in classcom.sun.source.util.SimpleTreeVisitor<java.lang.Void,AnnotatedTypeMirror>
-
-