public class LinearVisitor extends BaseTypeVisitor<LinearAnnotatedTypeFactory>
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".LinearChecker
BaseTypeVisitor.OverrideChecker
atypeFactory, checker, contractsUtils, positions, typeValidator, visitorState
elements, root, trees, types
Constructor and Description |
---|
LinearVisitor(BaseTypeChecker checker) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkMethodInvocability(AnnotatedTypeMirror.AnnotatedExecutableType method,
MethodInvocationTree node)
Linear Checker does not contain a rule for method invocation.
|
Void |
visitIdentifier(IdentifierTree node,
Void p) |
Void |
visitMemberSelect(MemberSelectTree node,
Void p) |
checkAccess, checkArguments, checkArrayInitialization, checkAssignability, checkConditionalPostcondition, checkConstructorInvocation, checkContract, checkDefaultConstructor, checkExceptionParameter, checkFieldInvariantDeclarations, checkForAnnotatedJdk, checkMethodReferenceAsOverride, checkOverride, checkPostcondition, checkPreconditions, checkThrownExpression, checkTypeArguments, checkTypecastRedundancy, checkTypecastSafety, checkVarargs, commonAssignmentCheck, commonAssignmentCheck, commonAssignmentCheck, createOverrideChecker, createTypeFactory, createTypeValidator, enclosingMemberSelect, enclosingStatement, getExceptionParameterLowerBoundAnnotations, getThrowUpperBoundAnnotations, getTypeFactory, isAccessAllowed, isAssignable, isValidUse, isValidUse, isValidUse, isVectorCopyInto, processClassTree, reportPurityErrors, scan, setRoot, shouldSkipUses, skipReceiverSubtypeCheck, testTypevarContainment, typeCheckVectorCopyIntoArgument, validateType, validateTypeOf, visitAnnotation, visitArrayAccess, visitAssignment, visitCatch, visitClass, visitCompilationUnit, visitCompoundAssignment, visitConditionalExpression, visitEnhancedForLoop, visitInstanceOf, visitLambdaExpression, visitMemberReference, visitMethod, visitMethodInvocation, visitNewArray, visitNewClass, visitParameterizedType, visitReturn, visitThrow, visitTry, visitTypeCast, visitTypeParameter, visitUnary, visitVariable
visit
getCurrentPath, scan
reduce, scan, visitAnnotatedType, visitArrayType, visitAssert, visitBinary, visitBlock, visitBreak, visitCase, visitContinue, visitDoWhileLoop, visitEmptyStatement, visitErroneous, visitExpressionStatement, visitForLoop, visitIf, visitImport, visitIntersectionType, visitLabeledStatement, visitLiteral, visitModifiers, visitOther, visitParenthesized, visitPrimitiveType, visitSwitch, visitSynchronized, visitUnionType, visitWhileLoop, visitWildcard
public LinearVisitor(BaseTypeChecker checker)
public Void visitIdentifier(IdentifierTree node, Void p)
visitIdentifier
in interface TreeVisitor<Void,Void>
visitIdentifier
in class BaseTypeVisitor<LinearAnnotatedTypeFactory>
public Void visitMemberSelect(MemberSelectTree node, Void p)
visitMemberSelect
in interface TreeVisitor<Void,Void>
visitMemberSelect
in class TreeScanner<Void,Void>
protected void checkMethodInvocability(AnnotatedTypeMirror.AnnotatedExecutableType method, MethodInvocationTree node)
checkMethodInvocability
in class BaseTypeVisitor<LinearAnnotatedTypeFactory>
method
- the type of the invoked methodnode
- the method invocation node