public class FenumVisitor extends BaseTypeVisitor<FenumAnnotatedTypeFactory>
BaseTypeVisitor.OverrideCheckeratypeFactory, checker, contractsUtils, positions, typeValidator, visitorStateelements, root, trees, treesWithSuppressWarnings, types| Constructor and Description |
|---|
FenumVisitor(BaseTypeChecker checker) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkConstructorInvocation(AnnotatedTypeMirror.AnnotatedDeclaredType dt,
AnnotatedTypeMirror.AnnotatedExecutableType constructor,
NewClassTree src) |
protected Set<? extends AnnotationMirror> |
getExceptionParameterLowerBoundAnnotations()
Returns a set of AnnotationMirrors that is a lower bound for exception parameters.
|
boolean |
isValidUse(AnnotatedTypeMirror.AnnotatedDeclaredType declarationType,
AnnotatedTypeMirror.AnnotatedDeclaredType useType,
Tree tree)
Tests that the qualifiers present on the useType are valid qualifiers, given the qualifiers
on the declaration of the type, declarationType.
|
Void |
visitBinary(BinaryTree node,
Void p) |
Void |
visitSwitch(SwitchTree node,
Void p) |
checkAccess, checkArguments, checkArrayInitialization, checkAssignability, checkConditionalPostcondition, checkContract, checkDefaultConstructor, checkExceptionParameter, checkFieldInvariantDeclarations, checkForAnnotatedJdk, checkMethodInvocability, checkMethodReferenceAsOverride, checkOverride, checkOverride, checkPostcondition, checkPreconditions, checkThrownExpression, checkTypeArguments, checkTypecastRedundancy, checkTypecastSafety, checkVarargs, commonAssignmentCheck, commonAssignmentCheck, commonAssignmentCheck, createOverrideChecker, createTypeFactory, createTypeValidator, enclosingMemberSelect, enclosingStatement, getThrowUpperBoundAnnotations, getTypeFactory, isAccessAllowed, isAssignable, isValidUse, isValidUse, isVectorCopyInto, processClassTree, reportPurityErrors, scan, setRoot, shouldSkipUses, 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, visitBlock, visitBreak, visitCase, visitContinue, visitDoWhileLoop, visitEmptyStatement, visitErroneous, visitExpressionStatement, visitForLoop, visitIf, visitImport, visitIntersectionType, visitLabeledStatement, visitLiteral, visitMemberSelect, visitModifiers, visitOther, visitParenthesized, visitPrimitiveType, visitSynchronized, visitTry, visitUnionType, visitWhileLoop, visitWildcardpublic FenumVisitor(BaseTypeChecker checker)
public Void visitBinary(BinaryTree node, Void p)
visitBinary in interface TreeVisitor<Void,Void>visitBinary in class TreeScanner<Void,Void>public Void visitSwitch(SwitchTree node, Void p)
visitSwitch in interface TreeVisitor<Void,Void>visitSwitch in class TreeScanner<Void,Void>protected boolean checkConstructorInvocation(AnnotatedTypeMirror.AnnotatedDeclaredType dt, AnnotatedTypeMirror.AnnotatedExecutableType constructor, NewClassTree src)
checkConstructorInvocation in class BaseTypeVisitor<FenumAnnotatedTypeFactory>protected Set<? extends AnnotationMirror> getExceptionParameterLowerBoundAnnotations()
BaseTypeVisitorNote: by default this method is called by BaseTypeVisitor.getThrowUpperBoundAnnotations(), so
that this annotation is enforced.
(Default is top)
getExceptionParameterLowerBoundAnnotations in class BaseTypeVisitor<FenumAnnotatedTypeFactory>public boolean isValidUse(AnnotatedTypeMirror.AnnotatedDeclaredType declarationType, AnnotatedTypeMirror.AnnotatedDeclaredType useType, Tree tree)
BaseTypeVisitorThe check is shallow, as it does not descend into generic or array types (i.e. only
performing the validity check on the raw type or outermost array dimension). BaseTypeVisitor.validateTypeOf(Tree) would call this for each type argument or array
dimension separately.
In most cases, useType simply needs to be a subtype of declarationType. If
a type system makes exceptions to this rule, its implementation should override this method.
isValidUse in class BaseTypeVisitor<FenumAnnotatedTypeFactory>declarationType - the type of the class (TypeElement)useType - the use of the class (instance type)tree - the tree where the type is used