protected abstract class CFAbstractValue.AnnotationSetCombiner extends Object
Subclasses must define how to combine sets by implementing the following methods:
#combineTwoAnnotations(AnnotationMirror, AnnotationMirror, AnnotationMirror)
#combineOneAnnotation(AnnotationMirror, AnnotatedTypeVariable, AnnotationMirror,
boolean)
#combineNoAnnotations(AnnotatedTypeVariable, AnnotatedTypeVariable,
AnnotationMirror, boolean)
Modifier | Constructor and Description |
---|---|
protected |
AnnotationSetCombiner() |
Modifier and Type | Method and Description |
---|---|
protected abstract @Nullable AnnotationMirror |
combineNoAnnotations(AnnotatedTypeMirror.AnnotatedTypeVariable aAtv,
AnnotatedTypeMirror.AnnotatedTypeVariable bAtv,
AnnotationMirror top,
boolean canCombinedSetBeMissingAnnos)
Returns the primary annotation that result from of combining the two
AnnotatedTypeMirror.AnnotatedTypeVariable . |
protected abstract @Nullable AnnotationMirror |
combineOneAnnotation(AnnotationMirror annotation,
AnnotatedTypeMirror.AnnotatedTypeVariable typeVar,
AnnotationMirror top,
boolean canCombinedSetBeMissingAnnos)
Returns the result of combining
annotation with typeVar . |
protected Set<AnnotationMirror> |
combineSets(TypeMirror aTypeMirror,
Set<AnnotationMirror> aSet,
TypeMirror bTypeMirror,
Set<AnnotationMirror> bSet,
boolean canCombinedSetBeMissingAnnos)
Combines the two sets.
|
protected abstract @Nullable AnnotationMirror |
combineTwoAnnotations(AnnotationMirror a,
AnnotationMirror b,
AnnotationMirror top)
Returns the result of combining the two annotations.
|
protected Set<AnnotationMirror> combineSets(TypeMirror aTypeMirror, Set<AnnotationMirror> aSet, TypeMirror bTypeMirror, Set<AnnotationMirror> bSet, boolean canCombinedSetBeMissingAnnos)
aTypeMirror
- the type mirror associated with aSet
aSet
- a set of annotation mirrorsbTypeMirror
- the type mirror associated with bSet
bSet
- a set of annotation mirrorscanCombinedSetBeMissingAnnos
- whether or not the combined set can be missing
annotationsprotected abstract @Nullable AnnotationMirror combineTwoAnnotations(AnnotationMirror a, AnnotationMirror b, AnnotationMirror top)
top
.a
- an annotation in the hierarchyb
- an annotation in the hierarchytop
- the top annotation in the hierarchyprotected abstract @Nullable AnnotationMirror combineNoAnnotations(AnnotatedTypeMirror.AnnotatedTypeVariable aAtv, AnnotatedTypeMirror.AnnotatedTypeVariable bAtv, AnnotationMirror top, boolean canCombinedSetBeMissingAnnos)
AnnotatedTypeMirror.AnnotatedTypeVariable
. If the result has not primary annotation, the null
is
returned. This method is called when no annotation exists in either sets for the hierarchy
whose top is top
.aAtv
- a type variable that does not have a primary annotation in top
hierarchybAtv
- a type variable that does not have a primary annotation in top
hierarchytop
- the top annotation in the hierarchycanCombinedSetBeMissingAnnos
- whether or notprotected abstract @Nullable AnnotationMirror combineOneAnnotation(AnnotationMirror annotation, AnnotatedTypeMirror.AnnotatedTypeVariable typeVar, AnnotationMirror top, boolean canCombinedSetBeMissingAnnos)
annotation
with typeVar
.
This is called when an annotation exists for the hierarchy in on set, but not the other.
annotation
- an annotationtypeVar
- a type variable that does not have a primary annotation in the hierarchytop
- the top annotation of the hierarchycanCombinedSetBeMissingAnnos
- whether or notannotation
with typeVar