public interface QualifierPolymorphism
Modifier and Type | Method and Description |
---|---|
static AnnotationMirror |
getPolymorphicQualifier(AnnotationMirror qual)
Returns the
PolymorphicQualifier meta-annotation on qual if one exists;
otherwise return null. |
static Name |
getPolymorphicQualifierElement(AnnotationMirror qual)
If
qual is a polymorphic qualifier, return the class specified by the PolymorphicQualifier meta-annotation on the polymorphic qualifier is returned. |
static boolean |
hasPolymorphicQualifier(AnnotationMirror qual)
Returns true if
qual has the PolymorphicQualifier meta-annotation. |
void |
resolve(AnnotatedTypeMirror.AnnotatedExecutableType functionalInterface,
AnnotatedTypeMirror.AnnotatedExecutableType memberReference)
Resolves polymorphism annotations for the given type.
|
void |
resolve(MethodInvocationTree tree,
AnnotatedTypeMirror.AnnotatedExecutableType type)
Resolves polymorphism annotations for the given type.
|
void |
resolve(NewClassTree tree,
AnnotatedTypeMirror.AnnotatedExecutableType type)
Resolves polymorphism annotations for the given type.
|
void |
resolve(VariableElement field,
AnnotatedTypeMirror owner,
AnnotatedTypeMirror type)
Resolves polymorphism annotations for the given field type.
|
static AnnotationMirror getPolymorphicQualifier(AnnotationMirror qual)
PolymorphicQualifier
meta-annotation on qual
if one exists;
otherwise return null.PolymorphicQualifier
meta-annotation on qual
if one exists;
otherwise return nullstatic boolean hasPolymorphicQualifier(AnnotationMirror qual)
qual
has the PolymorphicQualifier
meta-annotation.qual
- an annotationqual
has the PolymorphicQualifier
meta-annotationstatic Name getPolymorphicQualifierElement(AnnotationMirror qual)
qual
is a polymorphic qualifier, return the class specified by the PolymorphicQualifier
meta-annotation on the polymorphic qualifier is returned. Otherwise,
return null.
This value identifies the qualifier hierarchy to which this polymorphic qualifier belongs.
By convention, it is the top qualifier of the hierarchy. Use of PolymorphicQualifier.class
is discouraged, because it can lead to ambiguity if used for
multiple type systems.
qual
- an annotationPolymorphicQualifier
meta-annotation on qual
, if qual
is a polymorphic qualifier; otherwise, null.PolymorphicQualifier.value()
void resolve(MethodInvocationTree tree, AnnotatedTypeMirror.AnnotatedExecutableType type)
tree
- the tree associated with the typetype
- the type to annotate; is side-effected by this methodvoid resolve(NewClassTree tree, AnnotatedTypeMirror.AnnotatedExecutableType type)
tree
- the tree associated with the typetype
- the type to annotate; is side-effected by this methodvoid resolve(AnnotatedTypeMirror.AnnotatedExecutableType functionalInterface, AnnotatedTypeMirror.AnnotatedExecutableType memberReference)
functionalInterface
- the function type of memberReference
memberReference
- the type of a member reference; is side-effected by this methodvoid resolve(VariableElement field, AnnotatedTypeMirror owner, AnnotatedTypeMirror type)
field
- field element to whose poly annotation must be resolvedowner
- the type of the object whose field is being typedtype
- type of the field which still has poly annotations