public class KeyForVisitor extends BaseTypeVisitor<KeyForAnnotatedTypeFactory>
atypeFactory, checker, contractsUtils, positions, typeValidator, visitorStateelements, root, trees, types| Constructor and Description |
|---|
KeyForVisitor(BaseTypeChecker checker) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkConstructorInvocation(AnnotatedTypeMirror.AnnotatedDeclaredType expectedReturnType,
AnnotatedTypeMirror.AnnotatedExecutableType constructor,
Tree src)
The constructor type will have its flow expressions parsed and its KeyFor values
canonicalized before this point (in constructorFromUse).
|
protected void |
commonAssignmentCheck(AnnotatedTypeMirror varType,
AnnotatedTypeMirror valueType,
Tree valueTree,
@CompilerMessageKey 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 BaseTypeValidator |
createTypeValidator()
The type validator to ensure correct usage of the 'static' modifier.
|
checkAccess, checkAccess, checkArguments, checkArrayInitialization, checkAssignability, checkConditionalPostconditions, checkConditionalPostconditionsConsistency, checkContract, checkDefaultConstructor, checkExceptionParameter, checkFlowExprParameters, checkForAnnotatedJdk, checkMethodInvocability, checkMethodReferenceAsOverride, checkOverride, checkPostconditions, checkPostconditionsConsistency, checkPreconditions, checkPreconditions, checkPreconditionsConsistency, checkThrownExpression, checkTypeArguments, checkTypecastRedundancy, checkTypecastSafety, commonAssignmentCheck, commonAssignmentCheck, createTypeFactory, enclosingMemberSelect, enclosingStatement, getExceptionParameterLowerBoundAnnotations, getThrowUpperBoundAnnotations, getTypeFactory, isAccessAllowed, isAssignable, isValidUse, isValidUse, isValidUse, isVectorCopyInto, reportPurityErrors, scan, setRoot, shouldSkipUses, skipContractCheck, skipReceiverSubtypeCheck, testTypevarContainment, typeCheckVectorCopyIntoArgument, validateType, validateTypeOf, visitAnnotation, visitArrayAccess, visitAssignment, visitCatch, visitClass, visitCompilationUnit, visitCompoundAssignment, visitConditionalExpression, visitEnhancedForLoop, visitIdentifier, visitInstanceOf, visitLambdaExpression, visitMemberReference, visitMethod, visitMethodInvocation, visitNewArray, visitNewClass, visitParameterizedType, visitReturn, visitThrow, visitTypeCast, visitTypeParameter, visitUnary, visitVariablevisitgetCurrentPath, scanreduce, scan, visitAnnotatedType, visitArrayType, visitAssert, visitBinary, visitBlock, visitBreak, visitCase, visitContinue, visitDoWhileLoop, visitEmptyStatement, visitErroneous, visitExpressionStatement, visitForLoop, visitIf, visitImport, visitIntersectionType, visitLabeledStatement, visitLiteral, visitMemberSelect, visitModifiers, visitOther, visitParenthesized, visitPrimitiveType, visitSwitch, visitSynchronized, visitTry, visitUnionType, visitWhileLoop, visitWildcardpublic KeyForVisitor(BaseTypeChecker checker)
protected void commonAssignmentCheck(AnnotatedTypeMirror varType, AnnotatedTypeMirror valueType, Tree valueTree, @CompilerMessageKey String errorKey)
BaseTypeVisitorcommonAssignmentCheck in class BaseTypeVisitor<KeyForAnnotatedTypeFactory>varType - the annotated type of the variablevalueType - the annotated type of the valuevalueTree - the location to use when reporting the error messageerrorKey - the error message to use if the check fails (must be a
compiler message key, see CompilerMessageKey)protected BaseTypeValidator createTypeValidator()
createTypeValidator in class BaseTypeVisitor<KeyForAnnotatedTypeFactory>protected boolean checkConstructorInvocation(AnnotatedTypeMirror.AnnotatedDeclaredType expectedReturnType, AnnotatedTypeMirror.AnnotatedExecutableType constructor, Tree src)
checkConstructorInvocation in class BaseTypeVisitor<KeyForAnnotatedTypeFactory>