public static class QualifierDefaults.DefaultApplierElement extends Object
Modifier and Type | Class and Description |
---|---|
protected class |
QualifierDefaults.DefaultApplierElement.DefaultApplierElementImpl |
Modifier and Type | Field and Description |
---|---|
protected AnnotatedTypeFactory |
atypeFactory |
protected QualifierDefaults.DefaultApplierElement.DefaultApplierElementImpl |
impl |
protected TypeUseLocation |
location
Location to which to apply the default.
|
protected Element |
scope |
protected AnnotatedTypeMirror |
type |
Constructor and Description |
---|
DefaultApplierElement(AnnotatedTypeFactory atypeFactory,
Element scope,
AnnotatedTypeMirror type,
boolean applyToTypeVar) |
Modifier and Type | Method and Description |
---|---|
protected void |
addAnnotation(AnnotatedTypeMirror type,
AnnotationMirror qual)
Add the qualifier to the type if it does not already have an annotation in the same
hierarchy as qual.
|
void |
applyDefault(Default def)
Apply default to the type.
|
protected boolean |
shouldBeAnnotated(AnnotatedTypeMirror type,
boolean applyToTypeVar)
Returns true if the given qualifier should be applied to the given type.
|
protected final AnnotatedTypeFactory atypeFactory
protected final Element scope
protected final AnnotatedTypeMirror type
protected TypeUseLocation location
protected final QualifierDefaults.DefaultApplierElement.DefaultApplierElementImpl impl
public DefaultApplierElement(AnnotatedTypeFactory atypeFactory, Element scope, AnnotatedTypeMirror type, boolean applyToTypeVar)
public void applyDefault(Default def)
def
- default to applyprotected boolean shouldBeAnnotated(AnnotatedTypeMirror type, boolean applyToTypeVar)
type
- type to which qual would be appliedprotected void addAnnotation(AnnotatedTypeMirror type, AnnotationMirror qual)
type
- type to add qualqual
- annotation to add