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, org.checkerframework.framework.type.AnnotatedTypeMirror)
and
AnnotatedTypeFactory.addComputedTypeAnnotations(Tree, org.checkerframework.framework.type.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
.
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)
Processes an element by calling e.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 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
scan
in class AnnotatedTypeScanner<Void,Void>
type