Class ElementSuppressionChecker

All Implemented Interfaces:
Processor, OptionConfiguration
Direct Known Subclasses:
ErrorCountChecker

public class ElementSuppressionChecker extends BaseTypeChecker
A test checker for suppression of diagnostics reported on elements.
  • Constructor Details

    • ElementSuppressionChecker

      public ElementSuppressionChecker()
  • Method Details

    • shouldSuppressWarnings

      public boolean shouldSuppressWarnings(Element elt, String errKey)
      Also suppresses every diagnostic within a declaration whose name starts with "SuppressedByOverride", to test that an override of this overload applies to a diagnostic reported on a tree, too.
      Overrides:
      shouldSuppressWarnings in class SourceChecker
      Parameters:
      elt - the Element that might be a source of, or related to, a warning
      errKey - the error key the checker is emitting
      Returns:
      true if no warning should be emitted for the given Element, either because it is contained by a declaration with an appropriately-valued @SuppressWarnings annotation, because it is suppressed by command-line arguments, or because it is outside an AnnotatedFor scope when source-based unchecked defaults are enabled; false otherwise