Class TypeAnnotator
java.lang.Object
org.checkerframework.framework.type.visitor.AnnotatedTypeScanner<Void,Void>
org.checkerframework.framework.type.typeannotator.TypeAnnotator
- All Implemented Interfaces:
AnnotatedTypeVisitor<Void,Void>
- Direct Known Subclasses:
DefaultForTypeAnnotator,DefaultQualifierForUseTypeAnnotator,InitializationAnnotatedTypeFactory.CommitmentTypeAnnotator,IrrelevantTypeAnnotator,ListTypeAnnotator,MustCallTypeAnnotator,PropagationTypeAnnotator
TypeAnnotator is an abstract AnnotatedTypeScanner to be used with ListTypeAnnotator.-
Nested Class Summary
Nested classes/interfaces inherited from class org.checkerframework.framework.type.visitor.AnnotatedTypeScanner
AnnotatedTypeScanner.Reduce<R> -
Field Summary
FieldsFields inherited from class org.checkerframework.framework.type.visitor.AnnotatedTypeScanner
defaultResult, reduceFunction, visitedNodes -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTypeAnnotator(AnnotatedTypeFactory atypeFactory) Creates a new TypeAnnotator. -
Method Summary
Modifier and TypeMethodDescriptionvisitExecutable(AnnotatedTypeMirror.AnnotatedExecutableType method, Void aVoid) Visits 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
-
Field Details
-
atypeFactory
The type factory.
-
-
Constructor Details
-
TypeAnnotator
Creates a new TypeAnnotator.- Parameters:
atypeFactory- the type factory
-
-
Method Details
-
visitExecutable
Visits 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 classAnnotatedTypeScanner<Void,Void> - Parameters:
method- the type to visitaVoid- a visitor-specified parameter- Returns:
- a visitor-specified result
-