Package org.sonar.plugins.java.api
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 Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description Collection<File>
classFilesToAnalyze()
.class files to be analyzed.Collection<File>
classpath()
Classpath configured for the project.org.sonar.api.batch.fs.InputFile
findResourceByClassName(String className)
Retrieve a SonarQube resource by the class name.String
findSourceFileKeyByClassName(String className)
Deprecated.since 4.1 : will be dropped with no replacement.-
Methods inherited from interface org.sonar.plugins.java.api.JavaFileScanner
scanFile
-
-
-
-
Method Detail
-
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
-
findSourceFileKeyByClassName
@Deprecated String findSourceFileKeyByClassName(String className)
Deprecated.since 4.1 : will be dropped with no replacement.get source file key by class name.- Parameters:
className
- fully qualified name of the analyzed class.- Returns:
- key of the source file for the given class.
-
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.
-
-