| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcheckers.util.QualifierPolymorphism
public class QualifierPolymorphism
Implements framework support for type qualifier polymorphism. Checkers that
 wish to use it should add calls to
 #annotate(MethodInvocationTree, AnnotatedExecutableType) and
 annotate(Element, AnnotatedTypeMirror) to the
 AnnotatedTypeFactory.annotateImplicit(Tree, AnnotatedTypeMirror) and
 AnnotatedTypeFactory.annotateImplicit(Tree, AnnotatedTypeMirror)
 methods.
 
This implementation currently only supports polymorphism for method invocations, for which the return type depends on the unification of the parameter/receiver types.
PolymorphicQualifier| Field Summary | |
|---|---|
| protected  AnnotationMirror | polyQualThe polymorphic qualifier. | 
| protected  AnnotationMirror | rootQualThe qualifier at the root of the hierarchy. | 
| Constructor Summary | |
|---|---|
| QualifierPolymorphism(BaseTypeChecker checker,
                      AnnotatedTypeFactory factory)Creates a QualifierPolymorphisminstance that uses the given
 checker for querying type qualifiers and the given factory for getting
 annotated types. | |
| Method Summary | |
|---|---|
|  void | annotate(Element elt,
         AnnotatedTypeMirror type)Resolves polymorphism annotations for the given type. | 
|  void | annotate(MethodInvocationTree tree,
         AnnotatedTypeMirror.AnnotatedExecutableType type)Resolves polymorphism annotations for the given type. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected final AnnotationMirror polyQual
protected final AnnotationMirror rootQual
| Constructor Detail | 
|---|
public QualifierPolymorphism(BaseTypeChecker checker,
                             AnnotatedTypeFactory factory)
QualifierPolymorphism instance that uses the given
 checker for querying type qualifiers and the given factory for getting
 annotated types.
checker - the current checkerfactory - the factory for the current checker| Method Detail | 
|---|
public void annotate(Element elt,
                     AnnotatedTypeMirror type)
elt - the element associated with the typetype - the type to annotate
public void annotate(MethodInvocationTree tree,
                     AnnotatedTypeMirror.AnnotatedExecutableType type)
tree - the tree associated with the typetype - the type to annotate| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||