checkers.javari
Class JavariVisitor
java.lang.Object
   com.sun.source.util.TreeScanner<R,P>
com.sun.source.util.TreeScanner<R,P>
       com.sun.source.util.TreePathScanner<R,P>
com.sun.source.util.TreePathScanner<R,P>
           checkers.source.SourceVisitor<R,P>
checkers.source.SourceVisitor<R,P>
               checkers.basetype.BaseTypeVisitor<Void,Void>
checkers.basetype.BaseTypeVisitor<Void,Void>
                   checkers.javari.JavariVisitor
checkers.javari.JavariVisitor
- All Implemented Interfaces: 
- TreeVisitor<Void,Void>
- public class JavariVisitor 
- extends BaseTypeVisitor<Void,Void>
A type-checking visitor for the Javari mutability annotations
 (@ReadOnly, @Mutable and @Assignable) that
 extends BaseTypeVisitor.
- See Also:
- BaseTypeVisitor
 
 
 
 
| Method Summary | 
| protected  void | checkAssignability(AnnotatedTypeMirror varType,
                   Tree varTree)Checks whether the variable represented by the given type and
 tree can be assigned, causing a checker error otherwise.
 | 
|  void | validateTypeOf(Tree tree)Tests whether the tree expressed by the passed type tree
 contains a qualified primitive type on its qualified type, and
 if so emits an error.
 | 
|  Void | visitClass(ClassTree node,
           Void p)Ensures the class type is not
 @PolyReadoutside a@PolyReadcontext. | 
 
| Methods inherited from class checkers.basetype.BaseTypeVisitor | 
| checkArguments, checkMethodInvocability, checkOverride, checkTypeArguments, checkTypecastSafety, commonAssignmentCheck, commonAssignmentCheck, commonAssignmentCheck, scan, shouldSkip, shouldSkip, visitAnnotation, visitAssignment, visitCompilationUnit, visitCompoundAssignment, visitEnhancedForLoop, visitInstanceOf, visitMethod, visitMethodInvocation, visitNewArray, visitNewClass, visitParameterizedType, visitReturn, visitTypeCast, visitUnary, visitVariable | 
 
 
| Methods inherited from class com.sun.source.util.TreeScanner | 
| reduce, scan, visitAnnotatedType, visitArrayAccess, visitArrayType, visitAssert, visitBinary, visitBlock, visitBreak, visitCase, visitCatch, visitConditionalExpression, visitContinue, visitDoWhileLoop, visitEmptyStatement, visitErroneous, visitExpressionStatement, visitForLoop, visitIdentifier, visitIf, visitImport, visitLabeledStatement, visitLiteral, visitMemberSelect, visitModifiers, visitOther, visitParenthesized, visitPrimitiveType, visitSwitch, visitSynchronized, visitThrow, visitTry, visitTypeParameter, visitWhileLoop, visitWildcard | 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
JavariVisitor
public JavariVisitor(JavariChecker checker,
                     CompilationUnitTree root)
- Creates a new visitor for type-checking the Javari mutability
 annotations.
 
- Parameters:
- checker- the- JavariCheckerto use
- root- the root of the input program's AST to check
 
visitClass
public Void visitClass(ClassTree node,
                       Void p)
- Ensures the class type is not @PolyReadoutside a@PolyReadcontext.
 
- 
- Specified by:
- visitClassin interface- TreeVisitor<Void,Void>
- Overrides:
- visitClassin class- BaseTypeVisitor<Void,Void>
 
- 
 
checkAssignability
protected void checkAssignability(AnnotatedTypeMirror varType,
                                  Tree varTree)
- Checks whether the variable represented by the given type and
 tree can be assigned, causing a checker error otherwise.
 
- 
- Overrides:
- checkAssignabilityin class- BaseTypeVisitor<Void,Void>
 
- 
- Parameters:
- varType- the type of the variable being re-assigned
- varTree- the tree used to access the variable in the assignment
 
validateTypeOf
public void validateTypeOf(Tree tree)
- Tests whether the tree expressed by the passed type tree
 contains a qualified primitive type on its qualified type, and
 if so emits an error.
 
- 
- Overrides:
- validateTypeOfin class- BaseTypeVisitor<Void,Void>
 
- 
- Parameters:
- tree- the AST type supplied by the user