public class AnnotatedTypeMerger extends AnnotatedTypeComparer<java.lang.Void>
Example use:
AnnotatedTypeMirror visitType = ...;
AnnotatedTypeMirror parameter = ...;
visitType.accept(new AnnotatedTypesMerger(), parameter);
visitedNodes| Constructor and Description |
|---|
AnnotatedTypeMerger() |
AnnotatedTypeMerger(javax.lang.model.element.AnnotationMirror top) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Void |
combineRs(java.lang.Void r1,
java.lang.Void r2)
Supplies the logic to reduce on how to combine two R objects.
|
protected java.lang.Void |
compare(AnnotatedTypeMirror one,
AnnotatedTypeMirror two)
Compares two annotated type mirrors.
|
static void |
merge(AnnotatedTypeMirror from,
AnnotatedTypeMirror to)
Replaces or adds all annotations from
from to to. |
static void |
merge(AnnotatedTypeMirror from,
AnnotatedTypeMirror to,
javax.lang.model.element.AnnotationMirror top) |
protected void |
replaceAnnotations(AnnotatedTypeMirror one,
AnnotatedTypeMirror two) |
void |
resolvePrimaries(AnnotatedTypeMirror from,
AnnotatedTypeMirror to)
For type variables and wildcards, the absence of a primary annotations has an implied meaning
on substitution.
|
java.lang.Void |
visitTypeVariable(AnnotatedTypeMirror.AnnotatedTypeVariable from,
AnnotatedTypeMirror to)
Visits a type variable.
|
java.lang.Void |
visitWildcard(AnnotatedTypeMirror.AnnotatedWildcardType from,
AnnotatedTypeMirror to)
Visits a wildcard type.
|
reduce, scan, scan, scanAndReduce, scanAndReduce, visitArray, visitDeclared, visitExecutable, visitIntersection, visitUnionreset, scan, scanAndReduce, visit, visit, visitNoType, visitNull, visitPrimitivepublic AnnotatedTypeMerger()
public AnnotatedTypeMerger(javax.lang.model.element.AnnotationMirror top)
top - if top != null, then only annotation in the hierarchy of top are affected by this
mergerpublic static void merge(AnnotatedTypeMirror from, AnnotatedTypeMirror to)
from to to.public static void merge(AnnotatedTypeMirror from, AnnotatedTypeMirror to, javax.lang.model.element.AnnotationMirror top)
protected java.lang.Void compare(AnnotatedTypeMirror one, AnnotatedTypeMirror two)
AnnotatedTypeComparercompare in class AnnotatedTypeComparer<java.lang.Void>protected java.lang.Void combineRs(java.lang.Void r1,
java.lang.Void r2)
AnnotatedTypeComparercombineRs in class AnnotatedTypeComparer<java.lang.Void>protected void replaceAnnotations(AnnotatedTypeMirror one, AnnotatedTypeMirror two)
public java.lang.Void visitTypeVariable(AnnotatedTypeMirror.AnnotatedTypeVariable from, AnnotatedTypeMirror to)
AnnotatedTypeVisitorvisitTypeVariable in interface AnnotatedTypeVisitor<java.lang.Void,AnnotatedTypeMirror>visitTypeVariable in class AnnotatedTypeComparer<java.lang.Void>from - the type to visitto - a visitor-specified parameterpublic java.lang.Void visitWildcard(AnnotatedTypeMirror.AnnotatedWildcardType from, AnnotatedTypeMirror to)
AnnotatedTypeVisitorvisitWildcard in interface AnnotatedTypeVisitor<java.lang.Void,AnnotatedTypeMirror>visitWildcard in class AnnotatedTypeComparer<java.lang.Void>from - the type to visitto - a visitor-specified parameterpublic void resolvePrimaries(AnnotatedTypeMirror from, AnnotatedTypeMirror to)
from - a type variable or wildcard