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).
ImplicitsTypeAnnotator traverses types deeply by default, except that it skips the
method receiver of executable types (for interoperability with AnnotatedTypeFactory.annotateInheritedFromClass(org.checkerframework.framework.type.AnnotatedTypeMirror)).
This class takes care of two of the attributes of ImplicitFor; the others are handled
in TreeAnnotator.
TreeAnnotatortypeFactoryvisitedNodes| 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. |
visitExecutablereduce, reset, scan, scanAndReduce, scanAndReduce, visit, visit, visitArray, visitDeclared, visitIntersection, visitNoType, visitNull, visitPrimitive, visitTypeVariable, visitUnion, visitWildcardpublic 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)
AnnotatedTypeScannertype 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