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.
AnnotatedTypeScanner.Reduce<R>typeFactorydefaultResult, reduceFunction, 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)
Scan
type by calling type.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.
|
visitExecutablereduce, scan, scanAndReduce, scanAndReduce, visit, visit, visitArray, visitIntersection, visitNoType, visitNull, visitPrimitive, visitTypeVariable, visitUnionpublic PropagationTypeAnnotator(AnnotatedTypeFactory typeFactory)
public void reset()
AnnotatedTypeScannerreset in class AnnotatedTypeScanner<Void,Void>protected Void scan(AnnotatedTypeMirror type, Void aVoid)
AnnotatedTypeScannertype by calling type.accept(this, p); this method may be overridden by
subclasses.scan in class AnnotatedTypeScanner<Void,Void>type - type to scanaVoid - the parameter to usetypepublic 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