checkers.source
Class SourceVisitor<R,P>

java.lang.Object
  extended by com.sun.source.util.TreeScanner<R,P>
      extended by com.sun.source.util.TreePathScanner<R,P>
          extended by checkers.source.SourceVisitor<R,P>
All Implemented Interfaces:
TreeVisitor<R,P>
Direct Known Subclasses:
BaseTypeVisitor, TypeOutputtingChecker.Visitor

@DefaultQualifier(value="checkers.nullness.quals.NonNull")
public abstract class SourceVisitor<R,P>
extends TreePathScanner<R,P>

An AST visitor that provides a variety of compiler utilities and interfaces to facilitate typechecking.


Field Summary
Modifier and Type Field and Description
protected  AnnotatedTypeFactory atypeFactory
          The factory to use for obtaining "parsed" version of annotations.
protected  SourceChecker checker
          The SourceChecker to invoke on the input source tree.
protected  Elements elements
          The Elements helper to use when scanning.
protected  CompilationUnitTree root
          The root of the AST that this SourceVisitor will scan.
protected  Trees trees
          The Trees instance to use for scanning.
protected  Types types
          The Types helper to use when scanning.
 
Constructor Summary
Constructor and Description
SourceVisitor(SourceChecker checker, CompilationUnitTree root)
          Creates a SourceVisitor to use for scanning a source tree.
 
Method Summary
Modifier and Type Method and Description
 
Methods inherited from class com.sun.source.util.TreePathScanner
getCurrentPath, scan, scan
 
Methods inherited from class com.sun.source.util.TreeScanner
reduce, scan, visitAnnotatedType, visitAnnotation, visitArrayAccess, visitArrayType, visitAssert, visitAssignment, visitBinary, visitBlock, visitBreak, visitCase, visitCatch, visitClass, visitCompilationUnit, visitCompoundAssignment, visitConditionalExpression, visitContinue, visitDoWhileLoop, visitEmptyStatement, visitEnhancedForLoop, visitErroneous, visitExpressionStatement, visitForLoop, visitIdentifier, visitIf, visitImport, visitInstanceOf, visitLabeledStatement, visitLiteral, visitMemberSelect, visitMethod, visitMethodInvocation, visitModifiers, visitNewArray, 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
 

Field Detail

checker

protected final SourceChecker checker
The SourceChecker to invoke on the input source tree.


trees

protected final Trees trees
The Trees instance to use for scanning.


elements

protected final Elements elements
The Elements helper to use when scanning.


types

protected final Types types
The Types helper to use when scanning.


root

protected final CompilationUnitTree root
The root of the AST that this SourceVisitor will scan.


atypeFactory

protected final AnnotatedTypeFactory atypeFactory
The factory to use for obtaining "parsed" version of annotations.

Constructor Detail

SourceVisitor

public SourceVisitor(SourceChecker checker,
                     CompilationUnitTree root)
Creates a SourceVisitor to use for scanning a source tree.

Parameters:
checker - the checker to invoke on the input source tree
root - the AST root that this scanner will check against