Class TypeAnnotator
- java.lang.Object
-
- org.checkerframework.framework.type.visitor.AnnotatedTypeScanner<java.lang.Void,java.lang.Void>
-
- org.checkerframework.framework.type.typeannotator.TypeAnnotator
-
- All Implemented Interfaces:
AnnotatedTypeVisitor<java.lang.Void,java.lang.Void>
- Direct Known Subclasses:
DefaultForTypeAnnotator
,DefaultQualifierForUseTypeAnnotator
,InitializationParentAnnotatedTypeFactory.CommitmentTypeAnnotator
,IrrelevantTypeAnnotator
,ListTypeAnnotator
,MustCallTypeAnnotator
,PropagationTypeAnnotator
public abstract class TypeAnnotator extends AnnotatedTypeScanner<java.lang.Void,java.lang.Void>
TypeAnnotator
is an abstract AnnotatedTypeScanner to be used withListTypeAnnotator
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.checkerframework.framework.type.visitor.AnnotatedTypeScanner
AnnotatedTypeScanner.Reduce<R>
-
-
Field Summary
Fields Modifier and Type Field Description protected AnnotatedTypeFactory
atypeFactory
The type factory.-
Fields inherited from class org.checkerframework.framework.type.visitor.AnnotatedTypeScanner
defaultResult, reduceFunction, visitedNodes
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TypeAnnotator(AnnotatedTypeFactory atypeFactory)
Creates a new TypeAnnotator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Void
visitExecutable(AnnotatedTypeMirror.AnnotatedExecutableType method, java.lang.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 Detail
-
atypeFactory
protected final AnnotatedTypeFactory atypeFactory
The type factory.
-
-
Constructor Detail
-
TypeAnnotator
protected TypeAnnotator(AnnotatedTypeFactory atypeFactory)
Creates a new TypeAnnotator.- Parameters:
atypeFactory
- the type factory
-
-
Method Detail
-
visitExecutable
public java.lang.Void visitExecutable(AnnotatedTypeMirror.AnnotatedExecutableType method, java.lang.Void aVoid)
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:
visitExecutable
in interfaceAnnotatedTypeVisitor<java.lang.Void,java.lang.Void>
- Overrides:
visitExecutable
in classAnnotatedTypeScanner<java.lang.Void,java.lang.Void>
- Parameters:
method
- the type to visitaVoid
- a visitor-specified parameter- Returns:
- a visitor-specified result
-
-