Interface JavaResourceLocator

All Superinterfaces:
JavaCheck, JavaFileScanner
All Known Implementing Classes:
DefaultJavaResourceLocator

@Beta @ScannerSide @SonarLintSide public interface JavaResourceLocator extends JavaFileScanner
Interface to get the mapping between java classes and files (as multiple classes can be declared in one file).
  • Method Details

    • findResourceByClassName

      @CheckForNull org.sonar.api.batch.fs.InputFile findResourceByClassName(String className)
      Retrieve a SonarQube resource by the class name.
      Parameters:
      className - fully qualified name of the analyzed class
      Returns:
      null if not found
    • classFilesToAnalyze

      Collection<File> classFilesToAnalyze()
      .class files to be analyzed. Used by the findbugs plugin.
      Returns:
      a list of .class files corresponding to the source files to be analyzed.
    • classpath

      Collection<File> classpath()
      Classpath configured for the project. This classpath method is used by the findbugs plugin to configure the analysis.
      Returns:
      the list of jar and class files constituting the classpath of the analyzed project.