Class SubtypingChecker

All Implemented Interfaces:
Processor, OptionConfiguration

@SupportedOptions({"quals","qualDirs"}) public final class SubtypingChecker extends BaseTypeChecker
A checker for type qualifier systems that only checks subtyping relationships.

The annotation(s) are specified on the command line, using an annotation processor argument:

  • -Aquals: specifies the annotations in the qualifier hierarchy (as a comma-separated list of fully-qualified annotation names with no spaces in between). Only the annotations for one qualified subtype hierarchy can be passed.
See the Checker Framework Manual:
Subtying Checker
  • Constructor Details

    • SubtypingChecker

      public SubtypingChecker()
  • Method Details

    • getSuppressWarningsPrefixes

      public static NavigableSet<String> getSuppressWarningsPrefixes(SourceVisitor<?,?> visitor, NavigableSet<String> superSupportedTypeQualifiers)
      Compute SuppressWarnings prefixes, based on the names of all the qualifiers.

      Provided for the convenience of checkers that do not subclass SubtypingChecker (because it is final). Clients should call it like:

       SubtypingChecker.getSuppressWarningsPrefixes(this.visitor, super.getSuppressWarningsPrefixes());
      visitor - the visitor
      superSupportedTypeQualifiers - the result of super.getSuppressWarningsPrefixes(), as executed by checker
      SuppressWarnings prefixes, based on the names of all the qualifiers
    • getSuppressWarningsPrefixes

      public NavigableSet<String> getSuppressWarningsPrefixes()
      Description copied from class: SourceChecker
      Returns a modifiable set of lower-case strings that are prefixes for SuppressWarnings strings.

      The collection must not be empty and must not contain only SourceChecker.SUPPRESS_ALL_PREFIX.

      getSuppressWarningsPrefixes in class SourceChecker
      non-empty modifiable set of lower-case prefixes for SuppressWarnings strings