public abstract class QualifierHierarchy extends @NonNull Object
Constructor and Description |
---|
QualifierHierarchy() |
Modifier and Type | Method and Description |
---|---|
@Nullable AnnotationMirror |
findCorrespondingAnnotation(@Nullable AnnotationMirror aliased,
Set<@Nullable AnnotationMirror> annotations) |
abstract @Nullable AnnotationMirror |
getBottomAnnotation(@Nullable AnnotationMirror start)
Return the bottom for the given qualifier, that is, the qualifier that is a
subtype of start but no further subtypes exist.
|
abstract Set<@Nullable AnnotationMirror> |
getBottomAnnotations() |
abstract @Nullable AnnotationMirror |
getPolymorphicAnnotation(@Nullable AnnotationMirror start) |
abstract @Nullable AnnotationMirror |
getTopAnnotation(@Nullable AnnotationMirror start)
Return the top qualifier for the given qualifier, that is, the qualifier
that is a supertype of start but no further supertypes exist.
|
abstract Set<@Nullable AnnotationMirror> |
getTopAnnotations() |
abstract Set<@Nullable Name> |
getTypeQualifiers()
Returns the names of all type qualifiers in this type qualifier
hierarchy.
|
abstract @Nullable AnnotationMirror |
greatestLowerBound(@Nullable AnnotationMirror a1,
@Nullable AnnotationMirror a2)
Returns the greatest lower bound for the qualifiers a1 and a2.
|
Set<@Nullable AnnotationMirror> |
greatestLowerBounds(Collection<@Nullable AnnotationMirror> annos1,
Collection<@Nullable AnnotationMirror> annos2)
Returns the type qualifiers that are the greatest lower bound of
the qualifiers in annos1 and annos2.
|
abstract boolean |
isSubtype(@Nullable AnnotationMirror anno1,
@Nullable AnnotationMirror anno2)
Tests whether anno1 is a sub-qualifier of anno2, according to the
type qualifier hierarchy.
|
abstract boolean |
isSubtype(Collection<@Nullable AnnotationMirror> rhs,
Collection<@Nullable AnnotationMirror> lhs)
Tests whether there is any annotation in lhs that is a super qualifier
of some annotation in rhs.
|
abstract @Nullable AnnotationMirror |
leastUpperBound(@Nullable AnnotationMirror a1,
@Nullable AnnotationMirror a2)
Returns the least upper bound for the qualifiers a1 and a2.
|
Set<@Nullable AnnotationMirror> |
leastUpperBounds(Collection<@Nullable AnnotationMirror> annos1,
Collection<@Nullable AnnotationMirror> annos2)
Returns the type qualifiers that are the least upper bound of
the qualifiers in annos1 and annos2.
|
public abstract Set<@Nullable AnnotationMirror> getTopAnnotations()
public abstract @Nullable AnnotationMirror getTopAnnotation(@Nullable AnnotationMirror start)
public abstract @Nullable AnnotationMirror getBottomAnnotation(@Nullable AnnotationMirror start)
public abstract Set<@Nullable AnnotationMirror> getBottomAnnotations()
public abstract @Nullable AnnotationMirror getPolymorphicAnnotation(@Nullable AnnotationMirror start)
start
- Any qualifier from the type hierarchy.public abstract Set<@Nullable Name> getTypeQualifiers()
BaseTypeChecker.getSupportedTypeQualifiers()
?public abstract boolean isSubtype(@Nullable AnnotationMirror anno1, @Nullable AnnotationMirror anno2)
public abstract boolean isSubtype(Collection<@Nullable AnnotationMirror> rhs, Collection<@Nullable AnnotationMirror> lhs)
public abstract @Nullable AnnotationMirror leastUpperBound(@Nullable AnnotationMirror a1, @Nullable AnnotationMirror a2)
public abstract @Nullable AnnotationMirror greatestLowerBound(@Nullable AnnotationMirror a1, @Nullable AnnotationMirror a2)
a1
- First annotationa2
- Second annotationpublic Set<@Nullable AnnotationMirror> leastUpperBounds(Collection<@Nullable AnnotationMirror> annos1, Collection<@Nullable AnnotationMirror> annos2)
This is necessary for determining the type of a conditional expression (?:), where the type of the expression is the least upper bound of the true and false clauses.
public Set<@Nullable AnnotationMirror> greatestLowerBounds(Collection<@Nullable AnnotationMirror> annos1, Collection<@Nullable AnnotationMirror> annos2)
annos1
- First collection of qualifiersannos2
- Second collection of qualifierspublic @Nullable AnnotationMirror findCorrespondingAnnotation(@Nullable AnnotationMirror aliased, Set<@Nullable AnnotationMirror> annotations)