Class ReportChecker

All Implemented Interfaces:
Processor, OptionConfiguration

@SupportedOptions({"reportTreeKinds","reportModifiers"}) public class ReportChecker extends BaseTypeChecker
The Report Checker performs semantic searches over a program, for example, to find all methods that override a specific method, all classes that inherit from a specific class, or all uses of do-while-loops (and not also while loops!).

The search is specified in two different ways.

The first way is to write a stub specification file using the annotations in org.checkerframework.common.util.report.qual.*. You can see examples in the Checker Framework repository at framework/tests/report/reporttest.astub and framework/jtreg/StubParserEnum/AnnotationFileParserEnum.astub.

The second way is the -AreportTreeKinds and -AreportModifiers options, which search for specific tree kinds or modifiers.

Some similar features are available from IDEs (e.g., show references), but this tool provides much more flexibility and a command-line tool.

Options:

  • -AreportTreeKinds: comma-separated list of Tree.Kinds that should be reported
  • -AreportModifiers: comma-separated list of modifiers that should be reported
See Also:
  • Constructor Details

    • ReportChecker

      public ReportChecker()
      Creates a ReportChecker.