Class StandaloneDiamondVisitor
java.lang.Object
com.sun.source.util.TreeScanner<Void,Void>
com.sun.source.util.TreePathScanner<Void,Void>
org.checkerframework.framework.source.SourceVisitor<Void,Void>
org.checkerframework.common.basetype.BaseTypeVisitor<StandaloneDiamondAnnotatedTypeFactory>
org.checkerframework.framework.testchecker.standalonediamond.StandaloneDiamondVisitor
- All Implemented Interfaces:
TreeVisitor<Void,Void>
public class StandaloneDiamondVisitor
extends BaseTypeVisitor<StandaloneDiamondAnnotatedTypeFactory>
The visitor for the standalone diamond test checker. In addition to the usual checks, it reports
nodevalue.underlying.type for a diamond whose dataflow value has an underlying type other
than javac's type of the diamond.-
Nested Class Summary
Nested classes/interfaces inherited from class org.checkerframework.common.basetype.BaseTypeVisitor
BaseTypeVisitor.FoundRequired, BaseTypeVisitor.OverrideChecker -
Field Summary
Fields inherited from class org.checkerframework.common.basetype.BaseTypeVisitor
assumePureGetters, atypeFactory, checker, DETERMINISTIC, IMPURE, methodTree, PURE, qualHierarchy, showchecks, SIDE_EFFECT_FREE, slowTypecheckingSeconds, slowTypecheckingTree, TARGET, targetValueElement, typeHierarchy, typeValidator, unusedWhenElement, warnRedundantAnnotationsFields inherited from class org.checkerframework.framework.source.SourceVisitor
elements, root, trees, treesWithSuppressWarnings, types -
Constructor Summary
ConstructorsConstructorDescriptionStandaloneDiamondVisitor(BaseTypeChecker checker) Creates a new StandaloneDiamondVisitor. -
Method Summary
Modifier and TypeMethodDescriptionvisitNewClass(NewClassTree tree, Void p) Performs a new class invocation check.Methods inherited from class org.checkerframework.common.basetype.BaseTypeVisitor
checkAccess, checkAccessAllowed, checkAnnotationOnSupertype, checkArguments, checkArrayInitialization, checkConditionalPostcondition, checkConstructorInvocation, checkConstructorResult, checkContract, checkDefaultConstructor, checkEnclosingExpr, checkExceptionParameter, checkExplicitAnnotationsOnIntersectionBounds, checkExtendsAndImplements, checkExtendsOrImplements, checkExtendsOrImplementsEndDiagnostic, checkExtendsOrImplementsStartDiagnostic, checkFieldInvariantDeclarations, checkMethodInvocability, checkMethodInvocability, checkMethodReferenceAsOverride, checkOverride, checkOverride, checkPostcondition, checkPreconditions, checkPurityAnnotations, checkQualifierParameter, checkSuperConstructorCall, checkSyntheticMethodInvocation, checkSyntheticMethodInvocations, checkThisConstructorCall, checkThisOrSuperConstructorCall, checkThrownExpression, checkTypeArguments, checkTypecastRedundancy, checkTypecastSafety, checkVarargs, commonAssignmentCheck, commonAssignmentCheck, commonAssignmentCheck, commonAssignmentCheckEndDiagnostic, commonAssignmentCheckEndDiagnostic, commonAssignmentCheckStartDiagnostic, contractExpressionAndType, createOverrideChecker, createTypeFactory, createTypeFactoryPublic, createTypeValidator, enclosingMemberSelect, enclosingStatement, getExceptionParameterLowerBoundAnnotations, getThrowUpperBoundAnnotations, getTypeFactory, isInstanceOfPatternSafe, isTypeCastSafe, isValidUse, isValidUse, isValidUse, processClassTree, processMethodTree, processPackageTree, reportCommonAssignmentError, reportMethodInvocabilityError, reportPurityErrors, reportTypeArgumentInferenceFailure, scan, setRoot, shouldCheckTypeArgument, shouldCheckVarargs, shouldSkipUses, shouldWarnAboutIrrelevantJavaTypes, skipReceiverSubtypeCheck, testAnnotationInsertion, testJointJavacJavaParserVisitor, testTypevarContainment, typeCheckVectorCopyIntoArgument, validateType, validateTypeOf, visitAnnotatedType, visitAnnotatedType, visitAnnotation, visitAssignment, visitCatch, visitClass, visitCompilationUnit, visitCompoundAssignment, visitConditionalExpression, visitEnhancedForLoop, visitIdentifier, visitIf, visitInstanceOf, visitLambdaExpression, visitMemberReference, visitMethod, visitMethodInvocation, visitNewArray, visitPackage, visitReturn, visitSwitchExpression17, visitThrow, visitTypeCast, visitTypeParameter, visitUnary, visitVariable, warnAboutIrrelevantJavaTypes, warnInvalidPolymorphicQualifier, warnInvalidPolymorphicQualifier, warnRedundantAnnotationsMethods inherited from class org.checkerframework.framework.source.SourceVisitor
visitMethods inherited from class com.sun.source.util.TreePathScanner
getCurrentPath, scanMethods inherited from class com.sun.source.util.TreeScanner
reduce, scan, visitAnyPattern, visitArrayAccess, visitArrayType, visitAssert, visitBinary, visitBindingPattern, visitBlock, visitBreak, visitCase, visitConstantCaseLabel, visitContinue, visitDeconstructionPattern, visitDefaultCaseLabel, visitDoWhileLoop, visitEmptyStatement, visitErroneous, visitExports, visitExpressionStatement, visitForLoop, visitImport, visitIntersectionType, visitLabeledStatement, visitLiteral, visitMemberSelect, visitModifiers, visitModule, visitOpens, visitOther, visitParameterizedType, visitParenthesized, visitPatternCaseLabel, visitPrimitiveType, visitProvides, visitRequires, visitStringTemplate, visitSwitch, visitSwitchExpression, visitSynchronized, visitTry, visitUnionType, visitUses, visitWhileLoop, visitWildcard, visitYield
-
Constructor Details
-
StandaloneDiamondVisitor
Creates a new StandaloneDiamondVisitor.- Parameters:
checker- the checker
-
-
Method Details
-
visitNewClass
Description copied from class:BaseTypeVisitorPerforms 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:
visitNewClassin interfaceTreeVisitor<Void,Void> - Overrides:
visitNewClassin classBaseTypeVisitor<StandaloneDiamondAnnotatedTypeFactory>
-