Class NullnessNoInitAnnotatedTypeFactory.NullnessTypeAnnotator
java.lang.Object
org.checkerframework.framework.type.visitor.AnnotatedTypeScanner<Void,Void>
org.checkerframework.framework.type.typeannotator.TypeAnnotator
org.checkerframework.checker.nullness.NullnessNoInitAnnotatedTypeFactory.NullnessTypeAnnotator
- All Implemented Interfaces:
AnnotatedTypeVisitor<Void,Void>
- Enclosing class:
NullnessNoInitAnnotatedTypeFactory
This type annotator ensures that constructor return types are NONNULL, unless there is an
explicit different annotation.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.checkerframework.framework.type.visitor.AnnotatedTypeScanner
AnnotatedTypeScanner.Reduce<R> -
Field Summary
Fields inherited from class org.checkerframework.framework.type.typeannotator.TypeAnnotator
atypeFactoryFields inherited from class org.checkerframework.framework.type.visitor.AnnotatedTypeScanner
defaultResult, reduceFunction, visitedNodes -
Constructor Summary
ConstructorsConstructorDescriptionNullnessTypeAnnotator(NullnessNoInitAnnotatedTypeFactory atypeFactory) Creates a new NullnessTypeAnnotator. -
Method Summary
Modifier and TypeMethodDescriptionVisits an executable type.Methods inherited from class org.checkerframework.framework.type.visitor.AnnotatedTypeScanner
reduce, reset, scan, scan, scanAndReduce, scanAndReduce, visit, visit, visitArray, visitDeclared, visitIntersection, visitNoType, visitNull, visitPrimitive, visitTypeVariable, visitUnion, visitWildcard
-
Constructor Details
-
NullnessTypeAnnotator
Creates a new NullnessTypeAnnotator.- Parameters:
atypeFactory- this factory
-
-
Method Details
-
visitExecutable
Description copied from class:TypeAnnotatorVisits an executable type.If this method adds annotations to the type of method parameters, then
GenericAnnotatedTypeFactory.addComputedTypeAnnotations(Element, AnnotatedTypeMirror)should be overridden and the same annotations added to the type of elements with kindElementKind.PARAMETER. Likewise for return types.- Specified by:
visitExecutablein interfaceAnnotatedTypeVisitor<Void,Void> - Overrides:
visitExecutablein classTypeAnnotator- Parameters:
t- the type to visitp- a visitor-specified parameter- Returns:
- a visitor-specified result
-