Class VisitorsBridge

java.lang.Object
org.sonar.java.model.VisitorsBridge
Direct Known Subclasses:
VisitorsBridgeForTests

public class VisitorsBridge extends Object
  • Field Details

    • currentFile

      protected org.sonar.api.batch.fs.InputFile currentFile
    • javaVersion

      protected final JavaVersion javaVersion
    • inAndroidContext

      protected boolean inAndroidContext
  • Constructor Details

  • Method Details

    • getJavaVersion

      public JavaVersion getJavaVersion()
    • getClasspath

      public List<File> getClasspath()
    • setInAndroidContext

      public void setInAndroidContext(boolean inAndroidContext)
    • setCacheContext

      public void setCacheContext(CacheContext cacheContext)
    • scanWithoutParsing

      public boolean scanWithoutParsing(org.sonar.api.batch.fs.InputFile inputFile)
      In cases where incremental analysis is enabled, try to scan a raw file without parsing its content.
      Parameters:
      inputFile - The file to scan
      Returns:
      True if all scanners successfully scan the file without contents. False otherwise.
    • visitFile

      public void visitFile(@Nullable Tree parsedTree, boolean fileCanBeSkipped)
    • createScannerContext

      protected InputFileScannerContext createScannerContext(SonarComponents sonarComponents, org.sonar.api.batch.fs.InputFile inputFile, JavaVersion javaVersion, boolean inAndroidContext, CacheContext cacheContext)
    • createScannerContext

      protected JavaFileScannerContext createScannerContext(CompilationUnitTree tree, @Nullable Sema semanticModel, SonarComponents sonarComponents, boolean fileParsed)
    • createScannerContext

      protected ModuleScannerContext createScannerContext(@Nullable SonarComponents sonarComponents, JavaVersion javaVersion, boolean inAndroidContext, @Nullable CacheContext cacheContext)
    • processRecognitionException

      public void processRecognitionException(com.sonar.sslr.api.RecognitionException e, org.sonar.api.batch.fs.InputFile inputFile)
    • setCurrentFile

      public void setCurrentFile(org.sonar.api.batch.fs.InputFile inputFile)
    • endOfAnalysis

      public void endOfAnalysis()