public class UpperBoundVisitor extends BaseTypeVisitor<UpperBoundAnnotatedTypeFactory>
BaseTypeVisitor.OverrideCheckeratypeFactory, checker, contractsUtils, positions, TARGET, targetValueElement, typeValidator, visitorStateelements, root, trees, treesWithSuppressWarnings, types| Constructor and Description |
|---|
UpperBoundVisitor(BaseTypeChecker checker) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
commonAssignmentCheck(AnnotatedTypeMirror varType,
com.sun.source.tree.ExpressionTree valueTree,
@CompilerMessageKey java.lang.String errorKey)
Checks the validity of an assignment (or pseudo-assignment) from a value to a variable and
emits an error message (through the compiler's messaging interface) if it is not valid.
|
protected void |
commonAssignmentCheck(com.sun.source.tree.Tree varTree,
com.sun.source.tree.ExpressionTree valueTree,
@CompilerMessageKey java.lang.String errorKey)
Checks the validity of an assignment (or pseudo-assignment) from a value to a variable and
emits an error message (through the compiler's messaging interface) if it is not valid.
|
java.lang.Void |
visitAnnotation(com.sun.source.tree.AnnotationTree node,
java.lang.Void p)
Warns about LTLengthOf annotations with arguments whose lengths do not match.
|
java.lang.Void |
visitArrayAccess(com.sun.source.tree.ArrayAccessTree tree,
java.lang.Void type)
When the visitor reaches an array access, it needs to check a couple of things.
|
checkAccess, checkArguments, checkArrayInitialization, checkConditionalPostcondition, checkConstructorInvocation, checkConstructorResult, checkContract, checkDefaultConstructor, checkExceptionParameter, checkExtendsImplements, checkFieldInvariantDeclarations, checkForAnnotatedJdk, checkMethodInvocability, checkMethodReferenceAsOverride, checkOverride, checkOverride, checkPostcondition, checkPreconditions, checkSuperConstructorCall, checkThisConstructorCall, checkThisOrSuperConstructorCall, checkThrownExpression, checkTypeArguments, checkTypecastRedundancy, checkTypecastSafety, checkVarargs, commonAssignmentCheck, commonAssignmentCheckEndDiagnostic, commonAssignmentCheckStartDiagnostic, createOverrideChecker, createTypeFactory, createTypeValidator, enclosingMemberSelect, enclosingStatement, getExceptionParameterLowerBoundAnnotations, getThrowUpperBoundAnnotations, getTypeFactory, isAccessAllowed, isTypeCastSafe, isValidUse, isValidUse, isValidUse, processClassTree, reportPurityErrors, scan, setRoot, shouldSkipUses, skipReceiverSubtypeCheck, testTypevarContainment, typeCheckVectorCopyIntoArgument, validateType, validateTypeOf, visitAssignment, visitCatch, visitClass, visitCompilationUnit, visitCompoundAssignment, visitConditionalExpression, visitEnhancedForLoop, visitIdentifier, visitInstanceOf, visitLambdaExpression, visitMemberReference, visitMethod, visitMethodInvocation, visitNewArray, visitNewClass, visitReturn, visitThrow, visitTypeCast, visitTypeParameter, visitUnary, visitVariablevisitreduce, scan, visitAnnotatedType, visitArrayType, visitAssert, visitBinary, visitBlock, visitBreak, visitCase, visitContinue, visitDoWhileLoop, visitEmptyStatement, visitErroneous, visitExports, visitExpressionStatement, visitForLoop, visitIf, visitImport, visitIntersectionType, visitLabeledStatement, visitLiteral, visitMemberSelect, visitModifiers, visitModule, visitOpens, visitOther, visitPackage, visitParameterizedType, visitParenthesized, visitPrimitiveType, visitProvides, visitRequires, visitSwitch, visitSynchronized, visitTry, visitUnionType, visitUses, visitWhileLoop, visitWildcardpublic UpperBoundVisitor(BaseTypeChecker checker)
public java.lang.Void visitArrayAccess(com.sun.source.tree.ArrayAccessTree tree,
java.lang.Void type)
visitArrayAccess in interface com.sun.source.tree.TreeVisitor<java.lang.Void,java.lang.Void>visitArrayAccess in class BaseTypeVisitor<UpperBoundAnnotatedTypeFactory>public java.lang.Void visitAnnotation(com.sun.source.tree.AnnotationTree node,
java.lang.Void p)
visitAnnotation in interface com.sun.source.tree.TreeVisitor<java.lang.Void,java.lang.Void>visitAnnotation in class BaseTypeVisitor<UpperBoundAnnotatedTypeFactory>protected void commonAssignmentCheck(com.sun.source.tree.Tree varTree,
com.sun.source.tree.ExpressionTree valueTree,
@CompilerMessageKey java.lang.String errorKey)
BaseTypeVisitorcommonAssignmentCheck in class BaseTypeVisitor<UpperBoundAnnotatedTypeFactory>varTree - the AST node for the lvalue (usually a variable)valueTree - the AST node for the rvalue (the new value)errorKey - the error message to use if the check fails (must be a compiler message key,
see CompilerMessageKey)protected void commonAssignmentCheck(AnnotatedTypeMirror varType, com.sun.source.tree.ExpressionTree valueTree, @CompilerMessageKey java.lang.String errorKey)
BaseTypeVisitorcommonAssignmentCheck in class BaseTypeVisitor<UpperBoundAnnotatedTypeFactory>varType - the annotated type of the lvalue (usually a variable)valueTree - the AST node for the rvalue (the new value)errorKey - the error message to use if the check fails (must be a compiler message key,
see CompilerMessageKey)