public class PropagationTypeAnnotator extends TypeAnnotator
PropagationTypeAnnotator
adds qualifiers to types where the qualifier to add should be
transferred from one or more other types.
At the moment, the only function PropagationTypeAnnotator provides, is the propagation of generic type parameter annotations to unannotated wildcards with missing bounds annotations.
typeFactory
visitedNodes
Constructor and Description |
---|
PropagationTypeAnnotator(AnnotatedTypeFactory typeFactory) |
Modifier and Type | Method and Description |
---|---|
void |
reset()
Reset the scanner to allow reuse of the same instance.
|
protected Void |
scan(AnnotatedTypeMirror type,
Void aVoid)
Processes an element by calling e.accept(this, p); this method may be overridden by
subclasses.
|
Void |
visitDeclared(AnnotatedTypeMirror.AnnotatedDeclaredType declaredType,
Void aVoid)
Sometimes the underlying type parameters of AnnotatedWildcardTypes are not available on the
wildcards themselves.
|
Void |
visitWildcard(AnnotatedTypeMirror.AnnotatedWildcardType wildcardAtm,
Void aVoid)
Rather than defaulting the missing bounds of a wildcard, find the bound annotations on the
type parameter it replaced.
|
visitExecutable
reduce, scan, scanAndReduce, scanAndReduce, visit, visit, visitArray, visitIntersection, visitNoType, visitNull, visitPrimitive, visitTypeVariable, visitUnion
public PropagationTypeAnnotator(AnnotatedTypeFactory typeFactory)
public void reset()
AnnotatedTypeScanner
reset
in class AnnotatedTypeScanner<Void,Void>
protected Void scan(AnnotatedTypeMirror type, Void aVoid)
AnnotatedTypeScanner
scan
in class AnnotatedTypeScanner<Void,Void>
type
public Void visitDeclared(AnnotatedTypeMirror.AnnotatedDeclaredType declaredType, Void aVoid)
visitDeclared
in interface AnnotatedTypeVisitor<Void,Void>
visitDeclared
in class AnnotatedTypeScanner<Void,Void>
declaredType
- type to recordaVoid
- a visitor-specified parameterpublic Void visitWildcard(AnnotatedTypeMirror.AnnotatedWildcardType wildcardAtm, Void aVoid)
visitWildcard
in interface AnnotatedTypeVisitor<Void,Void>
visitWildcard
in class AnnotatedTypeScanner<Void,Void>
wildcardAtm
- type to annotateaVoid
- a visitor-specified parameter