Interface JavaResourceLocator
- All Superinterfaces:
JavaCheck
,JavaFileScanner
- All Known Implementing Classes:
DefaultJavaResourceLocator
Interface to get the mapping between java classes and files (as multiple classes can be declared in one file).
-
Method Summary
Modifier and TypeMethodDescriptionThe folders containing the binary .class files..class files to be analyzed.Classpath configured for the project.org.sonar.api.batch.fs.InputFile
findResourceByClassName
(String className) Retrieve a SonarQube resource by the class name.The folders containing the binary .class files corresponding to the tests.Classpath configured for the project tests.Methods inherited from interface org.sonar.plugins.java.api.JavaFileScanner
scanFile, scanWithoutParsing
-
Method Details
-
findResourceByClassName
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.
-
binaryDirs
Collection<File> binaryDirs()The folders containing the binary .class files.- Returns:
- a list of folders.
-
testBinaryDirs
Collection<File> testBinaryDirs()The folders containing the binary .class files corresponding to the tests.- Returns:
- a list of folders.
- Since:
- SonarJava 7.15
-
classpath
Collection<File> classpath()Classpath configured for the project.- Returns:
- the list of jar and class files constituting the classpath of the analyzed project.
-
testClasspath
Collection<File> testClasspath()Classpath configured for the project tests.- Returns:
- the list of jar and class files constituting the classpath of the analyzed project.
- Since:
- SonarJava 7.15
-