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,
com.sun.source.tree.MethodInvocationTree node)
Linear Checker does not contain a rule for method invocation.
|
java.lang.Void |
visitIdentifier(com.sun.source.tree.IdentifierTree node,
java.lang.Void p) |
java.lang.Void |
visitMemberSelect(com.sun.source.tree.MemberSelectTree node,
java.lang.Void p) |
checkAccess, checkArguments, checkArrayInitialization, checkAssignability, checkConditionalPostcondition, checkConstructorInvocation, checkContract, checkDefaultConstructor, checkExceptionParameter, checkFieldInvariantDeclarations, checkForAnnotatedJdk, checkMethodReferenceAsOverride, checkOverride, 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
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 java.lang.Void visitIdentifier(com.sun.source.tree.IdentifierTree node, java.lang.Void p)
visitIdentifier
in interface com.sun.source.tree.TreeVisitor<java.lang.Void,java.lang.Void>
visitIdentifier
in class BaseTypeVisitor<LinearAnnotatedTypeFactory>
public java.lang.Void visitMemberSelect(com.sun.source.tree.MemberSelectTree node, java.lang.Void p)
visitMemberSelect
in interface com.sun.source.tree.TreeVisitor<java.lang.Void,java.lang.Void>
visitMemberSelect
in class com.sun.source.util.TreeScanner<java.lang.Void,java.lang.Void>
protected void checkMethodInvocability(AnnotatedTypeMirror.AnnotatedExecutableType method, com.sun.source.tree.MethodInvocationTree node)
checkMethodInvocability
in class BaseTypeVisitor<LinearAnnotatedTypeFactory>
method
- the type of the invoked methodnode
- the method invocation node