Class KeyForPropagationTreeAnnotator
java.lang.Object
com.sun.source.util.SimpleTreeVisitor<Void,AnnotatedTypeMirror>
 
org.checkerframework.framework.type.treeannotator.TreeAnnotator
org.checkerframework.checker.nullness.KeyForPropagationTreeAnnotator
- All Implemented Interfaces:
- TreeVisitor<Void,- AnnotatedTypeMirror> 
For the following initializations we wish to propagate the annotations from the left-hand side to
 the right-hand side or vice versa:
 
1. If a keySet is being saved to a newly declared set, we transfer the annotations from the keySet to the lhs. e.g.,
 // The user is not required to explicitly annotate the LHS's type argument with @KeyFor("m")
 Set<String> keySet = m.keySet();
 
 // The user does not have to write @KeyFor("m") on both sides
 List<@KeyFor("m") String> keys = new ArrayList<String>();
 - 
Field SummaryFields inherited from class org.checkerframework.framework.type.treeannotator.TreeAnnotatoratypeFactoryFields inherited from class com.sun.source.util.SimpleTreeVisitorDEFAULT_VALUE
- 
Constructor SummaryConstructorsConstructorDescriptionKeyForPropagationTreeAnnotator(AnnotatedTypeFactory atypeFactory, KeyForPropagator propagationTreeAnnotator) 
- 
Method SummaryModifier and TypeMethodDescriptionbooleanisCallToKeyset(ExpressionTree expression) Returns true iff expression is a call to java.util.Map.KeySet.visitNewClass(NewClassTree tree, AnnotatedTypeMirror type) Transfers annotations to type if the left hand side is a variable declaration.visitVariable(VariableTree variableTree, AnnotatedTypeMirror type) Transfers annotations on type arguments from the initializer to the variableTree, if the initializer is a call to java.util.Map.keySet.Methods inherited from class org.checkerframework.framework.type.treeannotator.TreeAnnotatorlog, visitBinary, visitMethodMethods inherited from class com.sun.source.util.SimpleTreeVisitordefaultAction, visit, visit, visitAnnotatedType, visitAnnotation, visitArrayAccess, visitArrayType, visitAssert, visitAssignment, visitBindingPattern, visitBlock, visitBreak, visitCase, visitCatch, visitClass, visitCompilationUnit, visitCompoundAssignment, visitConditionalExpression, visitContinue, visitDefaultCaseLabel, visitDoWhileLoop, visitEmptyStatement, visitEnhancedForLoop, visitErroneous, visitExports, visitExpressionStatement, visitForLoop, visitGuardedPattern, visitIdentifier, visitIf, visitImport, visitInstanceOf, visitIntersectionType, visitLabeledStatement, visitLambdaExpression, visitLiteral, visitMemberReference, visitMemberSelect, visitMethodInvocation, visitModifiers, visitModule, visitNewArray, visitOpens, visitOther, visitPackage, visitParameterizedType, visitParenthesized, visitParenthesizedPattern, visitPrimitiveType, visitProvides, visitRequires, visitReturn, visitSwitch, visitSwitchExpression, visitSynchronized, visitThrow, visitTry, visitTypeCast, visitTypeParameter, visitUnary, visitUnionType, visitUses, visitWhileLoop, visitWildcard, visitYield
- 
Constructor Details- 
KeyForPropagationTreeAnnotatorpublic KeyForPropagationTreeAnnotator(AnnotatedTypeFactory atypeFactory, KeyForPropagator propagationTreeAnnotator) 
 
- 
- 
Method Details- 
isCallToKeysetReturns true iff expression is a call to java.util.Map.KeySet.- Returns:
- true iff expression is a call to java.util.Map.KeySet
 
- 
visitVariableTransfers annotations on type arguments from the initializer to the variableTree, if the initializer is a call to java.util.Map.keySet.- Specified by:
- visitVariablein interface- TreeVisitor<Void,- AnnotatedTypeMirror> 
- Overrides:
- visitVariablein class- SimpleTreeVisitor<Void,- AnnotatedTypeMirror> 
 
- 
visitNewClassTransfers annotations to type if the left hand side is a variable declaration.- Specified by:
- visitNewClassin interface- TreeVisitor<Void,- AnnotatedTypeMirror> 
- Overrides:
- visitNewClassin class- SimpleTreeVisitor<Void,- AnnotatedTypeMirror> 
 
 
-