|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object checkers.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)
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 |
polyQual
The polymorphic qualifier. |
protected AnnotationMirror |
rootQual
The qualifier at the root of the hierarchy. |
Constructor Summary | |
---|---|
QualifierPolymorphism(BaseTypeChecker checker,
AnnotatedTypeFactory factory)
Creates a QualifierPolymorphism instance 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 checkerMethod Detail |
---|
public void annotate(Element elt, AnnotatedTypeMirror type)
elt
- the element associated with the typetype
- the type to annotatepublic 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 |