public class DefaultForTypeAnnotator extends TypeAnnotator
DefaultFor
; it is designed to be used in a ListTypeAnnotator
constructed in
GenericAnnotatedTypeFactory.createTypeAnnotator()
()}
DefaultForTypeAnnotator
traverses types deeply.
This class takes care of two of the attributes of DefaultFor
; the others are handled
in QualifierDefaults
.
ListTypeAnnotator
AnnotatedTypeScanner.Reduce<R>
typeFactory
defaultResult, reduceFunction, visitedNodes
Constructor and Description |
---|
DefaultForTypeAnnotator(AnnotatedTypeFactory typeFactory)
Creates a
DefaultForTypeAnnotator from the given checker, using that checker to
determine the annotations that are in the type hierarchy. |
Modifier and Type | Method and Description |
---|---|
void |
addAtmClass(Class<? extends AnnotatedTypeMirror> typeClass,
AnnotationMirror theQual)
Add default qualifier,
theQual , for the given AnnotatedTypeMirror class. |
DefaultForTypeAnnotator |
addStandardDefaults()
Adds standard rules.
|
void |
addTypeKind(TypeKind typeKind,
AnnotationMirror theQual)
Add default qualifier,
theQual , for the given TypeKind. |
void |
addTypes(Class<?> clazz,
AnnotationMirror theQual)
Add default qualifier,
theQual , for the given type. |
protected Void |
scan(AnnotatedTypeMirror type,
Void p)
Scan
type by calling type.accept(this, p) ; this method may be overridden by
subclasses. |
visitExecutable
reduce, reset, scan, scanAndReduce, scanAndReduce, visit, visit, visitArray, visitDeclared, visitIntersection, visitNoType, visitNull, visitPrimitive, visitTypeVariable, visitUnion, visitWildcard
public DefaultForTypeAnnotator(AnnotatedTypeFactory typeFactory)
DefaultForTypeAnnotator
from the given checker, using that checker to
determine the annotations that are in the type hierarchy.public void addTypeKind(TypeKind typeKind, AnnotationMirror theQual)
theQual
, for the given TypeKind.public void addAtmClass(Class<? extends AnnotatedTypeMirror> typeClass, AnnotationMirror theQual)
theQual
, for the given AnnotatedTypeMirror
class.public void addTypes(Class<?> clazz, AnnotationMirror theQual)
theQual
, for the given type.protected Void scan(AnnotatedTypeMirror type, Void p)
AnnotatedTypeScanner
type
by calling type.accept(this, p)
; this method may be overridden by
subclasses.scan
in class AnnotatedTypeScanner<Void,Void>
type
- type to scanp
- the parameter to usetype
public DefaultForTypeAnnotator addStandardDefaults()
LiteralTreeAnnotator.addStandardLiteralQualifiers()
.