|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcheckers.util.DAGQualifierHierarchy.Factory
public static class DAGQualifierHierarchy.Factory
Factory used to create an instance of DAGQualifierHierarchy
.
A factory can be used to create at most one DAGQualifierHierarchy
.
To create a hierarchy, a client may do so in three steps:
1. add qualifiers using addQualifier(AnnotationMirror)
;
2. add subtype relations using addSubtype(AnnotationMirror, AnnotationMirror)
3. build the hierarchy and gets using build()
.
Notice that addSubtype(AnnotationMirror, AnnotationMirror)
adds
the two qualifiers to the hierarchy if they are not already in.
Also, once the client builds a hierarchy through build()
,
no further modifications are allowed nor can it making a new instance.
Clients build the hierarchy using addQualifier(AnnotationMirror)
and addSubtype(AnnotationMirror, AnnotationMirror)
, then get
the instance with calling build()
Constructor Summary | |
---|---|
DAGQualifierHierarchy.Factory()
|
|
DAGQualifierHierarchy.Factory(DAGQualifierHierarchy hierarchy)
Creates a factory for a hierarchy that initalized to be a copy of the passed hierarchy. |
Method Summary | |
---|---|
void |
addQualifier(AnnotationMirror qual)
Adds the passed qualifier to the hierarchy. |
void |
addSubtype(AnnotationMirror sub,
AnnotationMirror sup)
Adds a subtype relationship between the two type qualifiers. |
DAGQualifierHierarchy |
build()
Returns an instance of DAGQualifierHierarchy that represent
the hierarchy built so far |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DAGQualifierHierarchy.Factory(DAGQualifierHierarchy hierarchy)
public DAGQualifierHierarchy.Factory()
Method Detail |
---|
public void addQualifier(AnnotationMirror qual)
addSubtype(AnnotationMirror, AnnotationMirror)
.
public void addSubtype(AnnotationMirror sub, AnnotationMirror sup)
sub
- the sub type qualifiersup
- the super type qualifierpublic DAGQualifierHierarchy build()
DAGQualifierHierarchy
that represent
the hierarchy built so far
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |