checkers.linear
Class LinearVisitor
java.lang.Object
com.sun.source.util.TreeScanner<R,P>
com.sun.source.util.TreePathScanner<R,P>
checkers.source.SourceVisitor<R,P>
checkers.basetype.BaseTypeVisitor<Void,Void>
checkers.linear.LinearVisitor
- All Implemented Interfaces:
- TreeVisitor<Void,Void>
public class LinearVisitor
extends BaseTypeVisitor<Void,Void>
A type-checking visitor for the Linear type system. The visitor reports
an error ("unsafe.use") for any use of a reference of Unusable
type. In other words, it reports an error for any Linear
references that is used more than once, or is used after it has been
"used up".
- See Also:
LinearChecker
Methods inherited from class checkers.basetype.BaseTypeVisitor |
checkAccess, checkArguments, checkArrayInitialization, checkAssignability, checkConstructorInvocation, checkDefaultConstructor, checkForAnnotatedJdk, checkOverride, checkTypeArguments, checkTypecastRedundancy, checkTypecastSafety, commonAssignmentCheck, commonAssignmentCheck, commonAssignmentCheck, createTypeValidator, enclosingMemberSelect, enclosingStatement, isAccessAllowed, isVectorCopyInto, scan, shouldSkip, shouldSkip, typeCheckVectorCopyIntoArgument, validateTypeOf, visitAnnotation, visitAssignment, visitClass, 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, visitDisjointType, visitDoWhileLoop, visitEmptyStatement, visitErroneous, visitExpressionStatement, visitForLoop, visitIf, visitImport, visitLabeledStatement, visitLiteral, 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 |
LinearVisitor
public LinearVisitor(LinearChecker checker,
CompilationUnitTree root)
visitIdentifier
public Void visitIdentifier(IdentifierTree node,
Void p)
- Specified by:
visitIdentifier
in interface TreeVisitor<Void,Void>
- Overrides:
visitIdentifier
in class BaseTypeVisitor<Void,Void>
visitMemberSelect
public Void visitMemberSelect(MemberSelectTree node,
Void p)
- Specified by:
visitMemberSelect
in interface TreeVisitor<Void,Void>
- Overrides:
visitMemberSelect
in class TreeScanner<Void,Void>
checkMethodInvocability
protected boolean checkMethodInvocability(AnnotatedTypeMirror.AnnotatedExecutableType method,
MethodInvocationTree node)
- Linear Checker does not contain a rule for method invocation.
- Overrides:
checkMethodInvocability
in class BaseTypeVisitor<Void,Void>
- Parameters:
method
- the type of the invoked methodnode
- the method invocation node
- Returns:
- true iff the call of 'node' is a valid call