public abstract class QualifierHierarchy extends Object
Constructor and Description |
---|
QualifierHierarchy() |
Modifier and Type | Method and Description |
---|---|
AnnotationMirror |
findCorrespondingAnnotation(AnnotationMirror aliased,
Set<AnnotationMirror> annotations) |
abstract AnnotationMirror |
getBottomAnnotation(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<AnnotationMirror> |
getBottomAnnotations() |
abstract AnnotationMirror |
getPolymorphicAnnotation(AnnotationMirror start) |
abstract AnnotationMirror |
getTopAnnotation(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<AnnotationMirror> |
getTopAnnotations() |
abstract Set<Name> |
getTypeQualifiers()
Returns the names of all type qualifiers in this type qualifier
hierarchy.
|
abstract AnnotationMirror |
greatestLowerBound(AnnotationMirror a1,
AnnotationMirror a2)
Returns the greatest lower bound for the qualifiers a1 and a2.
|
Set<AnnotationMirror> |
greatestLowerBounds(Collection<AnnotationMirror> annos1,
Collection<AnnotationMirror> annos2)
Returns the type qualifiers that are the greatest lower bound of
the qualifiers in annos1 and annos2.
|
abstract boolean |
isSubtype(AnnotationMirror anno1,
AnnotationMirror anno2)
Tests whether anno1 is a sub-qualifier of anno2, according to the
type qualifier hierarchy.
|
abstract boolean |
isSubtype(Collection<AnnotationMirror> rhs,
Collection<AnnotationMirror> lhs)
Tests whether there is any annotation in lhs that is a super qualifier
of some annotation in rhs.
|
abstract AnnotationMirror |
leastUpperBound(AnnotationMirror a1,
AnnotationMirror a2)
Returns the least upper bound for the qualifiers a1 and a2.
|
Set<AnnotationMirror> |
leastUpperBounds(Collection<AnnotationMirror> annos1,
Collection<AnnotationMirror> annos2)
Returns the type qualifiers that are the least upper bound of
the qualifiers in annos1 and annos2.
|
public abstract Set<AnnotationMirror> getTopAnnotations()
public abstract AnnotationMirror getTopAnnotation(AnnotationMirror start)
public abstract AnnotationMirror getBottomAnnotation(AnnotationMirror start)
public abstract Set<AnnotationMirror> getBottomAnnotations()
public abstract AnnotationMirror getPolymorphicAnnotation(AnnotationMirror start)
start
- Any qualifier from the type hierarchy.public abstract Set<Name> getTypeQualifiers()
BaseTypeChecker.getSupportedTypeQualifiers()
?public abstract boolean isSubtype(AnnotationMirror anno1, AnnotationMirror anno2)
public abstract boolean isSubtype(Collection<AnnotationMirror> rhs, Collection<AnnotationMirror> lhs)
public abstract AnnotationMirror leastUpperBound(AnnotationMirror a1, AnnotationMirror a2)
public abstract AnnotationMirror greatestLowerBound(AnnotationMirror a1, AnnotationMirror a2)
a1
- First annotationa2
- Second annotationpublic Set<AnnotationMirror> leastUpperBounds(Collection<AnnotationMirror> annos1, Collection<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<AnnotationMirror> greatestLowerBounds(Collection<AnnotationMirror> annos1, Collection<AnnotationMirror> annos2)
annos1
- First collection of qualifiersannos2
- Second collection of qualifierspublic AnnotationMirror findCorrespondingAnnotation(AnnotationMirror aliased, Set<AnnotationMirror> annotations)