Class ReportVisitor
java.lang.Object
com.sun.source.util.TreeScanner<R,P>
com.sun.source.util.TreePathScanner<R,P>
org.checkerframework.framework.source.SourceVisitor<Void,Void>
org.checkerframework.common.basetype.BaseTypeVisitor<BaseAnnotatedTypeFactory>
org.checkerframework.common.util.count.report.ReportVisitor
- All Implemented Interfaces:
TreeVisitor<Void,
Void>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.checkerframework.common.basetype.BaseTypeVisitor
BaseTypeVisitor.OverrideChecker
-
Field Summary
Fields inherited from class org.checkerframework.common.basetype.BaseTypeVisitor
assumePureGetters, atypeFactory, checker, DETERMINISTIC, IMPURE, methodTree, positions, PURE, qualHierarchy, showchecks, SIDE_EFFECT_FREE, TARGET, targetValueElement, typeHierarchy, typeValidator, unusedWhenElement, warnRedundantAnnotations
Fields inherited from class org.checkerframework.framework.source.SourceVisitor
elements, root, trees, treesWithSuppressWarnings, types
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected BaseTypeValidator
void
processClassTree
(ClassTree tree) Type-check classTree.void
processMethodTree
(MethodTree tree) Type-check methodTree.visitArrayAccess
(ArrayAccessTree tree, Void p) visitAssignment
(AssignmentTree tree, Void p) Performs two checks: subtyping and assignability checks, usingBaseTypeVisitor.commonAssignmentCheck(Tree, ExpressionTree, String, Object[])
.visitIdentifier
(IdentifierTree tree, Void p) visitInstanceOf
(InstanceOfTree tree, Void p) visitMemberSelect
(MemberSelectTree tree, Void p) Performs a method invocation check.visitModifiers
(ModifiersTree tree, Void p) visitNewArray
(NewArrayTree tree, Void p) visitNewClass
(NewClassTree tree, Void p) Performs a new class invocation check.visitTypeCast
(TypeCastTree tree, Void p) Methods inherited from class org.checkerframework.common.basetype.BaseTypeVisitor
checkAccess, checkAccessAllowed, checkArguments, checkArrayInitialization, checkConditionalPostcondition, checkConstructorInvocation, checkConstructorResult, checkContract, checkDefaultConstructor, checkExceptionParameter, checkExplicitAnnotationsOnIntersectionBounds, checkExtendsAndImplements, checkExtendsOrImplements, checkFieldInvariantDeclarations, checkMethodInvocability, checkMethodReferenceAsOverride, checkOverride, checkOverride, checkPostcondition, checkPreconditions, checkPurityAnnotations, checkQualifierParameter, checkSuperConstructorCall, checkThisConstructorCall, checkThisOrSuperConstructorCall, checkThrownExpression, checkTypeArguments, checkTypecastRedundancy, checkTypecastSafety, checkVarargs, commonAssignmentCheck, commonAssignmentCheck, commonAssignmentCheck, commonAssignmentCheckEndDiagnostic, commonAssignmentCheckEndDiagnostic, commonAssignmentCheckStartDiagnostic, contractExpressionAndType, createOverrideChecker, createTypeFactory, createTypeFactoryPublic, enclosingMemberSelect, enclosingStatement, getExceptionParameterLowerBoundAnnotations, getThrowUpperBoundAnnotations, getTypeFactory, isTypeCastSafe, isValidUse, isValidUse, isValidUse, reportMethodInvocabilityError, reportPurityErrors, setRoot, shouldPerformContractInference, shouldSkipUses, shouldWarnAboutIrrelevantJavaTypes, skipReceiverSubtypeCheck, testAnnotationInsertion, testJointJavacJavaParserVisitor, testTypevarContainment, typeCheckVectorCopyIntoArgument, validateType, validateTypeOf, visitAnnotatedType, visitAnnotatedType, visitAnnotation, visitCatch, visitClass, visitCompilationUnit, visitCompoundAssignment, visitConditionalExpression, visitEnhancedForLoop, visitLambdaExpression, visitMemberReference, visitMethod, visitReturn, visitSwitchExpression17, visitThrow, visitTypeParameter, visitUnary, visitVariable, warnAboutIrrelevantJavaTypes, warnInvalidPolymorphicQualifier, warnInvalidPolymorphicQualifier, warnRedundantAnnotations
Methods inherited from class org.checkerframework.framework.source.SourceVisitor
visit
Methods inherited from class com.sun.source.util.TreePathScanner
getCurrentPath, scan
Methods inherited from class com.sun.source.util.TreeScanner
reduce, scan, visitArrayType, visitAssert, visitBinary, visitBindingPattern, visitBlock, visitBreak, visitCase, visitContinue, visitDefaultCaseLabel, visitDoWhileLoop, visitEmptyStatement, visitErroneous, visitExports, visitExpressionStatement, visitForLoop, visitGuardedPattern, visitIf, visitImport, visitIntersectionType, visitLabeledStatement, visitLiteral, visitModule, visitOpens, visitOther, visitPackage, visitParameterizedType, visitParenthesized, visitParenthesizedPattern, visitPrimitiveType, visitProvides, visitRequires, visitSwitch, visitSwitchExpression, visitSynchronized, visitTry, visitUnionType, visitUses, visitWhileLoop, visitWildcard, visitYield
-
Constructor Details
-
ReportVisitor
-
-
Method Details
-
scan
- Overrides:
scan
in classBaseTypeVisitor<BaseAnnotatedTypeFactory>
-
processClassTree
Description copied from class:BaseTypeVisitor
Type-check classTree. Subclasses should override this method instead ofBaseTypeVisitor.visitClass(ClassTree, Void)
.- Overrides:
processClassTree
in classBaseTypeVisitor<BaseAnnotatedTypeFactory>
- Parameters:
tree
- class to check
-
processMethodTree
Description copied from class:BaseTypeVisitor
Type-check methodTree. Subclasses should override this method instead ofBaseTypeVisitor.visitMethod(MethodTree, Void)
.- Overrides:
processMethodTree
in classBaseTypeVisitor<BaseAnnotatedTypeFactory>
- Parameters:
tree
- the method to type-check
-
visitMethodInvocation
Description copied from class:BaseTypeVisitor
Performs a method invocation check.An invocation of a method, m, on the receiver, r is valid only if:
- passed arguments are subtypes of corresponding m parameters
- r is a subtype of m receiver type
- if m is generic, passed type arguments are subtypes of m type variables
- Specified by:
visitMethodInvocation
in interfaceTreeVisitor<Void,
Void> - Overrides:
visitMethodInvocation
in classBaseTypeVisitor<BaseAnnotatedTypeFactory>
-
visitMemberSelect
- Specified by:
visitMemberSelect
in interfaceTreeVisitor<Void,
Void> - Overrides:
visitMemberSelect
in classTreeScanner<Void,
Void>
-
visitIdentifier
- Specified by:
visitIdentifier
in interfaceTreeVisitor<Void,
Void> - Overrides:
visitIdentifier
in classBaseTypeVisitor<BaseAnnotatedTypeFactory>
-
visitAssignment
Description copied from class:BaseTypeVisitor
Performs two checks: subtyping and assignability checks, usingBaseTypeVisitor.commonAssignmentCheck(Tree, ExpressionTree, String, Object[])
.If the subtype check fails, it issues an "assignment" error.
- Specified by:
visitAssignment
in interfaceTreeVisitor<Void,
Void> - Overrides:
visitAssignment
in classBaseTypeVisitor<BaseAnnotatedTypeFactory>
-
visitArrayAccess
- Specified by:
visitArrayAccess
in interfaceTreeVisitor<Void,
Void> - Overrides:
visitArrayAccess
in classTreeScanner<Void,
Void>
-
visitNewClass
Description copied from class:BaseTypeVisitor
Performs a new class invocation check.An invocation of a constructor, c, is valid only if:
- passed arguments are subtypes of corresponding c parameters
- if c is generic, passed type arguments are subtypes of c type variables
- Specified by:
visitNewClass
in interfaceTreeVisitor<Void,
Void> - Overrides:
visitNewClass
in classBaseTypeVisitor<BaseAnnotatedTypeFactory>
-
visitNewArray
- Specified by:
visitNewArray
in interfaceTreeVisitor<Void,
Void> - Overrides:
visitNewArray
in classBaseTypeVisitor<BaseAnnotatedTypeFactory>
-
visitTypeCast
- Specified by:
visitTypeCast
in interfaceTreeVisitor<Void,
Void> - Overrides:
visitTypeCast
in classBaseTypeVisitor<BaseAnnotatedTypeFactory>
-
visitInstanceOf
- Specified by:
visitInstanceOf
in interfaceTreeVisitor<Void,
Void> - Overrides:
visitInstanceOf
in classBaseTypeVisitor<BaseAnnotatedTypeFactory>
-
visitModifiers
- Specified by:
visitModifiers
in interfaceTreeVisitor<Void,
Void> - Overrides:
visitModifiers
in classTreeScanner<Void,
Void>
-
createTypeValidator
- Overrides:
createTypeValidator
in classBaseTypeVisitor<BaseAnnotatedTypeFactory>
-