|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object checkers.types.QualifierHierarchy
public abstract class QualifierHierarchy
Represents a type qualifiers hierarchy. All method parameter annotations need to be type qualifiers recognized within this hierarchy. This assumes that any particular annotated type in a program is annotated with at most one qualifier from the hierarchy.
Constructor Summary | |
---|---|
QualifierHierarchy()
|
Method Summary | |
---|---|
protected Set<AnnotationMirror> |
difference(Collection<AnnotationMirror> as1,
Collection<AnnotationMirror> as2)
|
abstract AnnotationMirror |
getRootAnnotation()
|
abstract Set<Name> |
getTypeQualifiers()
Returns the names of all type qualifiers in this type qualifier hierarchy |
protected Set<AnnotationMirror> |
intersect(Collection<AnnotationMirror> as1,
Collection<AnnotationMirror> as2)
|
abstract boolean |
isSubtype(AnnotationMirror anno1,
AnnotationMirror anno2)
Tests whether anno1 is a super qualifier anno2, according to the type qualifiers hierarchy. |
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 a1 and a2 qualifiers. |
Set<AnnotationMirror> |
leastUpperBound(Collection<AnnotationMirror> annos1,
Collection<AnnotationMirror> annos2)
Returns the type qualifiers that are the least upper bound of the qualifiers in annos1 and annos2. |
AnnotationMirror |
validQualifier(Collection<AnnotationMirror> annos)
Deprecated. |
List<AnnotationMirror> |
validQualifiers(Collection<AnnotationMirror> annos)
Deprecated. |
protected Collection<AnnotationMirror> |
wrapCollection(Collection<AnnotationMirror> annos)
null is treated as unqualified type, so it returns a collection
with null if annos is empty. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QualifierHierarchy()
Method Detail |
---|
public abstract AnnotationMirror getRootAnnotation()
public abstract Set<Name> getTypeQualifiers()
public abstract boolean isSubtype(AnnotationMirror anno1, AnnotationMirror anno2)
public boolean isSubtype(Collection<AnnotationMirror> rhs, Collection<AnnotationMirror> lhs)
public abstract AnnotationMirror leastUpperBound(AnnotationMirror a1, AnnotationMirror a2)
public Set<AnnotationMirror> leastUpperBound(Collection<AnnotationMirror> annos1, Collection<AnnotationMirror> annos2)
@Deprecated public List<AnnotationMirror> validQualifiers(Collection<AnnotationMirror> annos)
Annotated types only contain the supported qualifiers by the hierarchy currently. There is no need to call this method.
@Deprecated public AnnotationMirror validQualifier(Collection<AnnotationMirror> annos)
Annotated types only contain the supported qualifiers by the hierarchy currently. There is no need to call this method.
protected Collection<AnnotationMirror> wrapCollection(Collection<AnnotationMirror> annos)
null
is treated as unqualified type, so it returns a collection
with null
if annos is empty. Internally, null
represent
unqualified annotation.
null
protected Set<AnnotationMirror> intersect(Collection<AnnotationMirror> as1, Collection<AnnotationMirror> as2)
protected Set<AnnotationMirror> difference(Collection<AnnotationMirror> as1, Collection<AnnotationMirror> as2)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |