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(ProcessingEnvironment env,
AnnotatedTypeFactory factory)
Creates a
DefaultQualifierPolymorphism instance that uses the given factory
for querying type qualifiers and the given factory for getting annotated types. |
Modifier and Type | Method and Description |
---|---|
protected AnnotationMirrorSet |
combine(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
matches . |
annotate, annotate, annotate, reset
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPolymorphicQualifier, getPolymorphicQualifierTop, isPolyAll, isPolymorphicQualified
public DefaultQualifierPolymorphism(ProcessingEnvironment env, AnnotatedTypeFactory factory)
DefaultQualifierPolymorphism
instance that uses the given factory
for querying type qualifiers and the given factory 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
matches
.
This method is called on all parts of a type.
replace
in class AbstractQualifierPolymorphism
type
- AnnotationTypeMirror whose poly annotations are replacedreplacements
- mapping from polymorphic annotation to instantiationprotected AnnotationMirrorSet combine(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
a2Annos
- a set that is an instantiation of polyQual