public class ReportVisitor extends BaseTypeVisitor<BaseAnnotatedTypeFactory>
Modifier and Type | Class and Description |
---|---|
protected class |
ReportVisitor.ReportTypeValidator |
BaseTypeVisitor.OverrideChecker
atypeFactory, checker, contractsUtils, positions, TARGET, targetValueElement, typeValidator, visitorState
elements, root, trees, treesWithSuppressWarnings, types
Constructor and Description |
---|
ReportVisitor(BaseTypeChecker checker) |
checkAccess, checkArguments, checkArrayInitialization, checkConditionalPostcondition, checkConstructorInvocation, checkConstructorResult, checkContract, checkDefaultConstructor, checkExceptionParameter, checkExtendsImplements, checkFieldInvariantDeclarations, checkForAnnotatedJdk, checkMethodInvocability, checkMethodReferenceAsOverride, checkOverride, checkOverride, checkPostcondition, checkPreconditions, checkPurity, checkSuperConstructorCall, checkThisConstructorCall, checkThisOrSuperConstructorCall, checkThrownExpression, checkTypeArguments, checkTypecastRedundancy, checkTypecastSafety, checkVarargs, commonAssignmentCheck, commonAssignmentCheck, commonAssignmentCheck, commonAssignmentCheckEndDiagnostic, commonAssignmentCheckEndDiagnostic, commonAssignmentCheckStartDiagnostic, createOverrideChecker, createTypeFactory, enclosingMemberSelect, enclosingStatement, getExceptionParameterLowerBoundAnnotations, getThrowUpperBoundAnnotations, getTypeFactory, isAccessAllowed, isTypeCastSafe, isValidUse, isValidUse, isValidUse, reportMethodInvocabilityError, reportPurityErrors, setRoot, shouldSkipUses, skipReceiverSubtypeCheck, testTypevarContainment, typeCheckVectorCopyIntoArgument, validateType, validateTypeOf, visitAnnotation, visitCatch, visitClass, visitCompilationUnit, visitCompoundAssignment, visitConditionalExpression, visitEnhancedForLoop, visitLambdaExpression, visitMemberReference, visitReturn, visitThrow, visitTypeParameter, visitUnary, visitVariable
visit
getCurrentPath, scan
reduce, scan, visitAnnotatedType, visitArrayType, visitAssert, visitBinary, visitBlock, visitBreak, visitCase, visitContinue, visitDoWhileLoop, visitEmptyStatement, visitErroneous, visitExports, visitExpressionStatement, visitForLoop, visitIf, visitImport, visitIntersectionType, visitLabeledStatement, visitLiteral, visitModule, visitOpens, visitOther, visitPackage, visitParameterizedType, visitParenthesized, visitPrimitiveType, visitProvides, visitRequires, visitSwitch, visitSynchronized, visitTry, visitUnionType, visitUses, visitWhileLoop, visitWildcard
public ReportVisitor(BaseTypeChecker checker)
public Void scan(Tree tree, Void p)
scan
in class BaseTypeVisitor<BaseAnnotatedTypeFactory>
public void processClassTree(ClassTree node)
BaseTypeVisitor
BaseTypeVisitor.visitClass(ClassTree, Void)
.processClassTree
in class BaseTypeVisitor<BaseAnnotatedTypeFactory>
node
- class to checkpublic Void visitMethod(MethodTree node, Void p)
BaseTypeVisitor
The override rule specifies that a method, m1, may override a method m2 only if:
visitMethod
in interface TreeVisitor<Void,Void>
visitMethod
in class BaseTypeVisitor<BaseAnnotatedTypeFactory>
public Void visitMethodInvocation(MethodInvocationTree node, Void p)
BaseTypeVisitor
An invocation of a method, m, on the receiver, r is valid only if:
visitMethodInvocation
in interface TreeVisitor<Void,Void>
visitMethodInvocation
in class BaseTypeVisitor<BaseAnnotatedTypeFactory>
public Void visitMemberSelect(MemberSelectTree node, Void p)
visitMemberSelect
in interface TreeVisitor<Void,Void>
visitMemberSelect
in class TreeScanner<Void,Void>
public Void visitIdentifier(IdentifierTree node, Void p)
visitIdentifier
in interface TreeVisitor<Void,Void>
visitIdentifier
in class BaseTypeVisitor<BaseAnnotatedTypeFactory>
public Void visitAssignment(AssignmentTree node, Void p)
BaseTypeVisitor
BaseTypeVisitor.commonAssignmentCheck(Tree, ExpressionTree, String)
.
If the subtype check fails, it issues a "assignment.type.incompatible" error.
visitAssignment
in interface TreeVisitor<Void,Void>
visitAssignment
in class BaseTypeVisitor<BaseAnnotatedTypeFactory>
public Void visitArrayAccess(ArrayAccessTree node, Void p)
visitArrayAccess
in interface TreeVisitor<Void,Void>
visitArrayAccess
in class BaseTypeVisitor<BaseAnnotatedTypeFactory>
public Void visitNewClass(NewClassTree node, Void p)
BaseTypeVisitor
An invocation of a constructor, c, is valid only if:
visitNewClass
in interface TreeVisitor<Void,Void>
visitNewClass
in class BaseTypeVisitor<BaseAnnotatedTypeFactory>
public Void visitNewArray(NewArrayTree node, Void p)
visitNewArray
in interface TreeVisitor<Void,Void>
visitNewArray
in class BaseTypeVisitor<BaseAnnotatedTypeFactory>
public Void visitTypeCast(TypeCastTree node, Void p)
visitTypeCast
in interface TreeVisitor<Void,Void>
visitTypeCast
in class BaseTypeVisitor<BaseAnnotatedTypeFactory>
public Void visitInstanceOf(InstanceOfTree node, Void p)
visitInstanceOf
in interface TreeVisitor<Void,Void>
visitInstanceOf
in class BaseTypeVisitor<BaseAnnotatedTypeFactory>
public Void visitModifiers(ModifiersTree node, Void p)
visitModifiers
in interface TreeVisitor<Void,Void>
visitModifiers
in class TreeScanner<Void,Void>
protected BaseTypeValidator createTypeValidator()
createTypeValidator
in class BaseTypeVisitor<BaseAnnotatedTypeFactory>