Interface JavaFileScanner

All Superinterfaces:
JavaCheck
All Known Subinterfaces:
JavaResourceLocator
All Known Implementing Classes:
CommentLinesVisitor, DefaultJavaResourceLocator, FileLinesVisitor, IssuableSubscriptionVisitor, JavaFilesCache, JWarning.Mapper, LinesOfCodeVisitor, Measurer, Measurer.TestFileMeasurer, SubscriptionVisitor, SyntaxHighlighterVisitor

@Beta public interface JavaFileScanner extends JavaCheck
Common interface for all checks analyzing a java file.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Method called after parsing and semantic analysis has been done on file.
    default boolean
    Scan based on the raw file and cached data (ie: No tree is available at this stage).
  • Method Details

    • scanFile

      void scanFile(JavaFileScannerContext context)
      Method called after parsing and semantic analysis has been done on file.
      Parameters:
      context - Context of analysis containing the parsed tree.
    • scanWithoutParsing

      @Beta default boolean scanWithoutParsing(InputFileScannerContext inputFileScannerContext)
      Scan based on the raw file and cached data (ie: No tree is available at this stage). The rule should leverage data from the read cache. The rule should persist data to the write cache for future analyses.
      Parameters:
      inputFileScannerContext - The file that will eventually be scanned
      Returns:
      true by default or if successful (ie: no further scanning is required). false if the file cannot be scanned exhaustively without contents.