public class DefaultQualifierPolymorphism extends AbstractQualifierPolymorphism
AbstractQualifierPolymorphism
. The polymorphic qualifiers for a
checker that uses this class are found by searching all supported qualifiers. Instantiations of a
polymorphic qualifier are combined using lub.atypeFactory, POLYALL, polyQuals, qualHierarchy, topQuals
Constructor and Description |
---|
DefaultQualifierPolymorphism(javax.annotation.processing.ProcessingEnvironment env,
AnnotatedTypeFactory factory)
Creates a
DefaultQualifierPolymorphism instance that uses factory for
querying type qualifiers and for getting annotated types. |
Modifier and Type | Method and Description |
---|---|
protected AnnotationMirrorSet |
combine(javax.lang.model.element.AnnotationMirror polyQual,
AnnotationMirrorSet a1Annos,
AnnotationMirrorSet a2Annos)
Returns the lub of the two sets.
|
protected void |
replace(AnnotatedTypeMirror type,
AnnotationMirrorMap<AnnotationMirrorSet> replacements)
Replaces the top-level polymorphic annotations in
type with the instantiations in
replacements . |
reset, resolve, resolve, resolve
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPolymorphicQualifier, getPolymorphicQualifierElement, getPolymorphicQualifierTop, hasPolymorphicQualifier, isPolyAll, isPolymorphicQualified
public DefaultQualifierPolymorphism(javax.annotation.processing.ProcessingEnvironment env, AnnotatedTypeFactory factory)
DefaultQualifierPolymorphism
instance that uses factory
for
querying type qualifiers and for getting annotated types.env
- the processing environmentfactory
- the factory for the current checkerprotected void replace(AnnotatedTypeMirror type, AnnotationMirrorMap<AnnotationMirrorSet> replacements)
AbstractQualifierPolymorphism
type
with the instantiations in
replacements
.
This method is called on all parts of a type.
replace
in class AbstractQualifierPolymorphism
type
- AnnotatedTypeMirror whose poly annotations are replaced; it is side-effected by
this methodreplacements
- mapping from polymorphic annotation to instantiationprotected AnnotationMirrorSet combine(javax.lang.model.element.AnnotationMirror polyQual, AnnotationMirrorSet a1Annos, AnnotationMirrorSet a2Annos)
combine
in class AbstractQualifierPolymorphism
polyQual
- polymorphic qualifier for which a1Annos
and a2Annos
are
instantiationsa1Annos
- a set that is an instantiation of polyQual
, or nulla2Annos
- a set that is an instantiation of polyQual
, or null