|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcheckers.types.QualifierHierarchy
checkers.util.GraphQualifierHierarchy
public class GraphQualifierHierarchy
Represents the type qualifier hierarchy of a type system. It uses a an internal graph to represent the hierarchy. In addition to simply representing qualifiers, this implementation allows for two special qualifiers:
Constructor Summary | |
---|---|
GraphQualifierHierarchy()
Constructs an instance of GraphQualifierHierarchy with
no qualifier (i.e. |
|
GraphQualifierHierarchy(AnnotationMirror root)
Initialize an instance with the provided annotation being the root annotation in the hierarchy |
Method Summary | |
---|---|
void |
addSubtype(AnnotationMirror subAnno,
AnnotationMirror superAnno)
Adds a subtype relationship between two type qualifiers. |
boolean |
addTypeQualifier(AnnotationMirror anno)
Add a type qualifier to the type hierarchy |
AnnotationMirror |
getRootAnnotation()
|
Set<Name> |
getTypeQualifiers()
Returns the names of the type qualifiers recognized within this type qualifier hierarchy |
boolean |
isInConflict(AnnotationMirror a1,
AnnotationMirror a2)
Check if the two annotations are in conflict. |
boolean |
isSubtype(AnnotationMirror sub,
AnnotationMirror sup)
Tests whether anno1 is a super qualifier anno2, according to the type qualifiers hierarchy. |
void |
setRootAnnotation(AnnotationMirror root)
Set the root type qualifier of the represented hierarchy |
void |
setWildcard(AnnotationMirror placeHolder)
Declare a wildcard annotation that matches all annotations |
Methods inherited from class checkers.types.QualifierHierarchy |
---|
getAnnotation, getAnnotations, isSubtype |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GraphQualifierHierarchy()
GraphQualifierHierarchy
with
no qualifier (i.e. null
) being the root qualifier
public GraphQualifierHierarchy(AnnotationMirror root)
root
- the type qualifier that is the supertype of all other qualifiersMethod Detail |
---|
public boolean addTypeQualifier(AnnotationMirror anno)
anno
- a type qualifier
public void addSubtype(AnnotationMirror subAnno, AnnotationMirror superAnno)
subAnno
- the sub type qualifiersuperAnno
- the super type qualifierpublic AnnotationMirror getRootAnnotation()
getRootAnnotation
in class QualifierHierarchy
public void setRootAnnotation(AnnotationMirror root)
root
- the root (the ultimate super) type qualifierpublic void setWildcard(AnnotationMirror placeHolder)
placeHolder
- the place holder annotationpublic boolean isSubtype(AnnotationMirror sub, AnnotationMirror sup)
QualifierHierarchy
isSubtype
in class QualifierHierarchy
sub
- a type qualifiersup
- a type qualifier
public Set<Name> getTypeQualifiers()
QualifierHierarchy
getTypeQualifiers
in class QualifierHierarchy
public boolean isInConflict(AnnotationMirror a1, AnnotationMirror a2)
QualifierHierarchy
isInConflict
in class QualifierHierarchy
a1
- a type qualifiera2
- a type qualifier
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |