public class ImplicitsTypeAnnotator extends TypeAnnotator
ImplicitFor
annotation and applies implicit annotations specified by ImplicitFor
for any type whose visitor is not overridden or does not call super
; it is designed to be
invoked from AnnotatedTypeFactory.addComputedTypeAnnotations(Element,
AnnotatedTypeMirror)
and AnnotatedTypeFactory.addComputedTypeAnnotations(Tree,
AnnotatedTypeMirror)
.
This class takes care of two of the attributes of ImplicitFor
; the others are handled
in TreeAnnotator
.
TreeAnnotator
typeFactory
visitedNodes
Constructor and Description |
---|
ImplicitsTypeAnnotator(AnnotatedTypeFactory typeFactory)
Creates a
ImplicitsTypeAnnotator from the given checker, using that checker to
determine the annotations that are in the type hierarchy. |
Modifier and Type | Method and Description |
---|---|
void |
addTypeClass(Class<? extends AnnotatedTypeMirror> typeClass,
AnnotationMirror theQual) |
void |
addTypeKind(TypeKind typeKind,
AnnotationMirror theQual) |
void |
addTypeName(Class<?> typeName,
AnnotationMirror theQual) |
protected Void |
scan(AnnotatedTypeMirror type,
Void p)
Scan
type by calling type.accept(this, p) ; this method may be overridden by
subclasses. |
reduce, reset, scan, scanAndReduce, scanAndReduce, visit, visit, visitArray, visitDeclared, visitExecutable, visitIntersection, visitNoType, visitNull, visitPrimitive, visitTypeVariable, visitUnion, visitWildcard
public ImplicitsTypeAnnotator(AnnotatedTypeFactory typeFactory)
ImplicitsTypeAnnotator
from the given checker, using that checker to
determine the annotations that are in the type hierarchy.public void addTypeKind(TypeKind typeKind, AnnotationMirror theQual)
public void addTypeClass(Class<? extends AnnotatedTypeMirror> typeClass, AnnotationMirror theQual)
public void addTypeName(Class<?> typeName, AnnotationMirror theQual)
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