checkers.propkey
Class PropertyKeyAnnotatedTypeFactory.KeyLookupTreeAnnotator

java.lang.Object
  extended by com.sun.source.util.SimpleTreeVisitor<Void,AnnotatedTypeMirror>
      extended by checkers.types.TreeAnnotator
          extended by checkers.propkey.PropertyKeyAnnotatedTypeFactory.KeyLookupTreeAnnotator
All Implemented Interfaces:
TreeVisitor<Void,AnnotatedTypeMirror>
Enclosing class:
PropertyKeyAnnotatedTypeFactory<Checker extends PropertyKeyChecker>

protected class PropertyKeyAnnotatedTypeFactory.KeyLookupTreeAnnotator
extends TreeAnnotator

This TreeAnnotator checks for every String literal whether it is included in the lookup keys. If it is, the given annotation is added to the literal; otherwise, nothing happens. Subclasses of this AnnotatedTypeFactory can directly reuse this class and use a different annotation as parameter.


Field Summary
Modifier and Type Field and Description
 
Fields inherited from class com.sun.source.util.SimpleTreeVisitor
DEFAULT_VALUE
 
Constructor Summary
Constructor and Description
PropertyKeyAnnotatedTypeFactory.KeyLookupTreeAnnotator(BaseTypeChecker checker, AnnotatedTypeFactory tf, Class<? extends Annotation> annot)
           
 
Method Summary
Modifier and Type Method and Description
 Void visitLiteral(LiteralTree tree, AnnotatedTypeMirror type)
           
 
Methods inherited from class checkers.types.TreeAnnotator
defaultAction, visitNewArray
 
Methods inherited from class com.sun.source.util.SimpleTreeVisitor
visit, visit, visitAnnotatedType, visitAnnotation, visitArrayAccess, visitArrayType, visitAssert, visitAssignment, visitBinary, visitBlock, visitBreak, visitCase, visitCatch, visitClass, visitCompilationUnit, visitCompoundAssignment, visitConditionalExpression, visitContinue, visitDisjointType, visitDoWhileLoop, visitEmptyStatement, visitEnhancedForLoop, visitErroneous, visitExpressionStatement, visitForLoop, visitIdentifier, visitIf, visitImport, visitInstanceOf, visitLabeledStatement, visitMemberSelect, visitMethod, visitMethodInvocation, visitModifiers, visitNewClass, visitOther, visitParameterizedType, visitParenthesized, visitPrimitiveType, visitReturn, visitSwitch, visitSynchronized, visitThrow, visitTry, visitTypeCast, visitTypeParameter, visitUnary, visitVariable, visitWhileLoop, visitWildcard
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyKeyAnnotatedTypeFactory.KeyLookupTreeAnnotator

public PropertyKeyAnnotatedTypeFactory.KeyLookupTreeAnnotator(BaseTypeChecker checker,
                                                              AnnotatedTypeFactory tf,
                                                              Class<? extends Annotation> annot)
Method Detail

visitLiteral

public Void visitLiteral(LiteralTree tree,
                         AnnotatedTypeMirror type)
Specified by:
visitLiteral in interface TreeVisitor<Void,AnnotatedTypeMirror>
Overrides:
visitLiteral in class TreeAnnotator