Class ListTypeAnnotator
- java.lang.Object
-
- org.checkerframework.framework.type.visitor.AnnotatedTypeScanner<java.lang.Void,java.lang.Void>
-
- org.checkerframework.framework.type.typeannotator.TypeAnnotator
-
- org.checkerframework.framework.type.typeannotator.ListTypeAnnotator
-
- All Implemented Interfaces:
AnnotatedTypeVisitor<java.lang.Void,java.lang.Void>
public final class ListTypeAnnotator extends TypeAnnotator
ListTypeAnnotator is a TypeAnnotator that executes a list ofTypeAnnotator
for each type visited.Checkers should not extend ListTypeAnnotator; they should instead pass a custom TypeAnnotator to the constructor.
- See Also:
DefaultForTypeAnnotator
,PropagationTypeAnnotator
-
-
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
atypeFactory
-
Fields inherited from class org.checkerframework.framework.type.visitor.AnnotatedTypeScanner
defaultResult, reduceFunction, visitedNodes
-
-
Constructor Summary
Constructors Constructor Description ListTypeAnnotator(java.util.List<TypeAnnotator> annotators)
ListTypeAnnotator(TypeAnnotator... annotators)
Create a new ListTypeAnnotator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Void
scan(AnnotatedTypeMirror type, java.lang.Void aVoid)
Scantype
by callingtype.accept(this, p)
; this method may be overridden by subclasses.java.lang.String
toString()
-
Methods inherited from class org.checkerframework.framework.type.typeannotator.TypeAnnotator
visitExecutable
-
Methods inherited from class org.checkerframework.framework.type.visitor.AnnotatedTypeScanner
reduce, reset, scan, scanAndReduce, scanAndReduce, visit, visit, visitArray, visitDeclared, visitIntersection, visitNoType, visitNull, visitPrimitive, visitTypeVariable, visitUnion, visitWildcard
-
-
-
-
Constructor Detail
-
ListTypeAnnotator
public ListTypeAnnotator(TypeAnnotator... annotators)
Create a new ListTypeAnnotator.- Parameters:
annotators
- the annotators that will be executed for each type scanned by this TypeAnnotator. They are executed in the order passed in.
-
ListTypeAnnotator
public ListTypeAnnotator(java.util.List<TypeAnnotator> annotators)
- Parameters:
annotators
- the annotators that will be executed for each type scanned by this TypeAnnotator. They are executed in the order passed in.
-
-
Method Detail
-
scan
protected java.lang.Void scan(AnnotatedTypeMirror type, java.lang.Void aVoid)
Description copied from class:AnnotatedTypeScanner
Scantype
by callingtype.accept(this, p)
; this method may be overridden by subclasses.- Overrides:
scan
in classAnnotatedTypeScanner<java.lang.Void,java.lang.Void>
- Parameters:
type
- type to scanaVoid
- the parameter to use- Returns:
- the result of visiting
type
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-