Class QualifierDefaults.DefaultApplierElement

java.lang.Object
org.checkerframework.framework.util.defaults.QualifierDefaults.DefaultApplierElement
Enclosing class:
QualifierDefaults

protected class QualifierDefaults.DefaultApplierElement extends Object
A default applier element.
  • Field Details

  • Constructor Details

  • Method Details

    • applyDefault

      public void applyDefault(Default def)
      Apply default to the type.
      Parameters:
      def - default to apply
    • shouldBeAnnotated

      protected boolean shouldBeAnnotated(AnnotatedTypeMirror type, boolean applyToTypeVar)
      Returns 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
    • addAnnotation

      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.
      Parameters:
      type - type to add qual
      qual - annotation to add