Class QualifierDefaults.DefaultApplierElement
java.lang.Object
org.checkerframework.framework.util.defaults.QualifierDefaults.DefaultApplierElement
- Enclosing class:
- QualifierDefaults
A default applier element.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprotected class
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final AnnotatedTypeFactoryThe annotated type factory.The default element applier implementation.protected TypeUseLocationLocation to which to apply the default.protected final ElementThe scope of the default.protected final AnnotatedTypeMirrorThe type to which to apply the default.
- 
Constructor SummaryConstructorsConstructorDescriptionDefaultApplierElement(AnnotatedTypeFactory atypeFactory, Element scope, AnnotatedTypeMirror type, boolean applyToTypeVar) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidaddAnnotation(AnnotatedTypeMirror type, AnnotationMirror qual) Add the qualifier to the type if it does not already have an annotation in the same hierarchy as qual.voidapplyDefault(Default def) Apply default to the type.protected booleanshouldBeAnnotated(AnnotatedTypeMirror type, boolean applyToTypeVar) Returns true if the given qualifier should be applied to the given type.
- 
Field Details- 
atypeFactoryThe annotated type factory.
- 
scopeThe scope of the default.
- 
typeThe type to which to apply the default.
- 
locationLocation to which to apply the default. (Should only be set by the applyDefault method.)
- 
implThe default element applier implementation.
 
- 
- 
Constructor Details- 
DefaultApplierElementpublic DefaultApplierElement(AnnotatedTypeFactory atypeFactory, Element scope, AnnotatedTypeMirror type, boolean applyToTypeVar) 
 
- 
- 
Method Details- 
applyDefaultApply default to the type.- Parameters:
- def- default to apply
 
- 
shouldBeAnnotatedReturns true if the given qualifier should be applied to the given type. Currently we do not apply defaults to void types, packages, wildcards, and type variables.- Parameters:
- type- type to which qual would be applied
- Returns:
- true if this application should proceed
 
- 
addAnnotationAdd the qualifier to the type if it does not already have an annotation in the same hierarchy as qual.- Parameters:
- type- type to add qual
- qual- annotation to add
 
 
-