Interface QualifierKind
- All Superinterfaces:
- Comparable<QualifierKind>
- All Known Implementing Classes:
- DefaultQualifierKindHierarchy.DefaultQualifierKind
@AnnotatedFor("nullness")
@Interned
public interface QualifierKind
extends Comparable<QualifierKind>
Represents a kind of qualifier, which is an annotation class. 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 QualifierKind holds information about the relationship between itself and other
 QualifierKinds.
 
Exactly one qualifier kind is created for each annotation class.
The set of all QualifierKinds for a checker is like an enum. One QualifierKind is like an enum constant in that they are immutable after initialization and only a finite number exist per type system.
- 
Method SummaryModifier and TypeMethodDescriptiondefault intClass<? extends Annotation>Returns the annotation class for this.Returns the bottom qualifier kind of the hierarchy to which this qualifier kind belongs.getName()Returns the canonical name of the annotation class of this.Returns the polymorphic qualifier kind of the hierarchy to which this qualifier kind belongs, or null if one does not exist.Set<? extends QualifierKind>All the qualifier kinds that are a strict super qualifier of this qualifier.getTop()Returns the top qualifier kind of the hierarchy to which this qualifier kind belongs.booleanReturns 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 Details- 
getName@Interned @CanonicalName String getName()Returns the canonical name of the annotation class of this.- Returns:
- the canonical name of the annotation class of this
 
- 
getAnnotationClassClass<? extends Annotation> getAnnotationClass()Returns the annotation class for this.- Returns:
- the annotation class for this
 
- 
getTopQualifierKind 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
 
- 
isTopboolean isTop()Returns true if this is the top qualifier of its hierarchy.- Returns:
- true if this is the top qualifier of its hierarchy
 
- 
getBottomQualifierKind 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
 
- 
isBottomboolean 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
 
- 
isPolyReturns true if this is polymorphic.- Returns:
- true if this is polymorphic
 
- 
hasElementsboolean 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
 
- 
getStrictSuperTypesSet<? 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
 
- 
isInSameHierarchyAsReturns true if this andotherare in the same hierarchy.- Parameters:
- other- a qualifier kind
- Returns:
- true if this and otherare in the same hierarchy
 
- 
isSubtypeOfReturns 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- Specified by:
- compareToin interface- Comparable<QualifierKind>
 
 
-