Interface QualifierKind
- 
- All Superinterfaces:
 java.lang.Comparable<QualifierKind>
- All Known Implementing Classes:
 DefaultQualifierKindHierarchy.DefaultQualifierKind
@AnnotatedFor("nullness") @Interned public interface QualifierKind extends java.lang.Comparable<QualifierKind>
Represents a kind of qualifier, which is an annotation class. Does not represent annotation elements. If two qualifiers use the same annotation class, then they have the same qualifier kind. Two qualifiers can have the same "kind" of qualifier but not be the same qualifier; an example is@IndexFor("a")and@IndexFor("b").A
QualifierKindholds information about the relationship between itself and otherQualifierKinds.Exactly one qualifier kind is created for each annotation class.
The set of all
QualifierKinds for a checker is like an enum. OneQualifierKindis like an enum constant in that they are immutable after initialization and only a finite number exist per type system. 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default intcompareTo(QualifierKind o)java.lang.Class<? extends java.lang.annotation.Annotation>getAnnotationClass()Returns the annotation class for this.QualifierKindgetBottom()Returns the bottom qualifier kind of the hierarchy to which this qualifier kind belongs.@Interned @CanonicalName java.lang.StringgetName()Returns the canonical name of the annotation class of this.@Nullable QualifierKindgetPolymorphic()Returns the polymorphic qualifier kind of the hierarchy to which this qualifier kind belongs, or null if one does not exist.java.util.Set<? extends QualifierKind>getStrictSuperTypes()All the qualifier kinds that are a strict super qualifier of this qualifier.QualifierKindgetTop()Returns the top qualifier kind of the hierarchy to which this qualifier kind belongs.booleanhasElements()Returns true if the annotation class this qualifier kind represents has annotation elements/arguments.booleanisBottom()Returns true if this is the bottom qualifier of its hierarchy.booleanisInSameHierarchyAs(QualifierKind other)Returns true if this andotherare in the same hierarchy.booleanisPoly()Returns true if this is polymorphic.booleanisSubtypeOf(QualifierKind superQualKind)Returns true if this qualifier kind is a subtype of or equal tosuperQualKind.booleanisTop()Returns true if this is the top qualifier of its hierarchy. 
 - 
 
- 
- 
Method Detail
- 
getName
@Interned @CanonicalName java.lang.String getName()
Returns the canonical name of the annotation class of this.- Returns:
 - the canonical name of the annotation class of this
 
 
- 
getAnnotationClass
java.lang.Class<? extends java.lang.annotation.Annotation> getAnnotationClass()
Returns the annotation class for this.- Returns:
 - the annotation class for this
 
 
- 
getTop
QualifierKind getTop()
Returns the top qualifier kind of the hierarchy to which this qualifier kind belongs.- Returns:
 - the top qualifier kind of the hierarchy to which this qualifier kind belongs
 
 
- 
isTop
boolean isTop()
Returns true if this is the top qualifier of its hierarchy.- Returns:
 - true if this is the top qualifier of its hierarchy
 
 
- 
getBottom
QualifierKind getBottom()
Returns the bottom qualifier kind of the hierarchy to which this qualifier kind belongs.- Returns:
 - the bottom qualifier kind of the hierarchy to which this qualifier kind belongs
 
 
- 
isBottom
boolean isBottom()
Returns true if this is the bottom qualifier of its hierarchy.- Returns:
 - true if this is the bottom qualifier of its hierarchy
 
 
- 
getPolymorphic
@Nullable QualifierKind getPolymorphic()
Returns the polymorphic qualifier kind of the hierarchy to which this qualifier kind belongs, or null if one does not exist.- Returns:
 - the polymorphic qualifier kind of the hierarchy to which this qualifier kind belongs, or null if one does not exist
 
 
- 
isPoly
@Pure boolean isPoly()
Returns true if this is polymorphic.- Returns:
 - true if this is polymorphic
 
 
- 
hasElements
boolean hasElements()
Returns true if the annotation class this qualifier kind represents has annotation elements/arguments.- Returns:
 - true if the annotation class this qualifier kind represents has elements/arguments
 
 
- 
getStrictSuperTypes
java.util.Set<? extends QualifierKind> getStrictSuperTypes()
All the qualifier kinds that are a strict super qualifier of this qualifier. Does not include this qualifier kind itself.- Returns:
 - all the qualifier kinds that are a strict super qualifier of this qualifier
 
 
- 
isInSameHierarchyAs
boolean isInSameHierarchyAs(QualifierKind other)
Returns true if this andotherare in the same hierarchy.- Parameters:
 other- a qualifier kind- Returns:
 - true if this and 
otherare in the same hierarchy 
 
- 
isSubtypeOf
boolean isSubtypeOf(QualifierKind superQualKind)
Returns true if this qualifier kind is a subtype of or equal tosuperQualKind.- Parameters:
 superQualKind- other qualifier kind- Returns:
 - true if this qualifier kind is a subtype of or equal to 
superQualKind 
 
- 
compareTo
default int compareTo(QualifierKind o)
- Specified by:
 compareToin interfacejava.lang.Comparable<QualifierKind>
 
 - 
 
 -