Class DefaultJavaResourceLocator
java.lang.Object
org.sonar.java.DefaultJavaResourceLocator
- All Implemented Interfaces:
JavaCheck
,JavaFileScanner
,JavaResourceLocator
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultJavaResourceLocator
(ClasspathForMain javaClasspath, ClasspathForTest javaTestClasspath) -
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.void
scanFile
(JavaFileScannerContext context) Method called after parsing and semantic analysis has been done on file.The folders containing the binary .class files corresponding to the tests.Classpath configured for the project tests.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.sonar.plugins.java.api.JavaFileScanner
scanWithoutParsing
-
Constructor Details
-
DefaultJavaResourceLocator
public DefaultJavaResourceLocator(ClasspathForMain javaClasspath, ClasspathForTest javaTestClasspath)
-
-
Method Details
-
findResourceByClassName
Description copied from interface:JavaResourceLocator
Retrieve a SonarQube resource by the class name.- Specified by:
findResourceByClassName
in interfaceJavaResourceLocator
- Parameters:
className
- fully qualified name of the analyzed class- Returns:
- null if not found
-
classFilesToAnalyze
Description copied from interface:JavaResourceLocator
.class files to be analyzed. Used by the findbugs plugin.- Specified by:
classFilesToAnalyze
in interfaceJavaResourceLocator
- Returns:
- a list of .class files corresponding to the source files to be analyzed.
-
classpath
Description copied from interface:JavaResourceLocator
Classpath configured for the project.- Specified by:
classpath
in interfaceJavaResourceLocator
- Returns:
- the list of jar and class files constituting the classpath of the analyzed project.
-
testClasspath
Description copied from interface:JavaResourceLocator
Classpath configured for the project tests.- Specified by:
testClasspath
in interfaceJavaResourceLocator
- Returns:
- the list of jar and class files constituting the classpath of the analyzed project.
-
binaryDirs
Description copied from interface:JavaResourceLocator
The folders containing the binary .class files.- Specified by:
binaryDirs
in interfaceJavaResourceLocator
- Returns:
- a list of folders.
-
testBinaryDirs
Description copied from interface:JavaResourceLocator
The folders containing the binary .class files corresponding to the tests.- Specified by:
testBinaryDirs
in interfaceJavaResourceLocator
- Returns:
- a list of folders.
-
scanFile
Description copied from interface:JavaFileScanner
Method called after parsing and semantic analysis has been done on file.- Specified by:
scanFile
in interfaceJavaFileScanner
- Parameters:
context
- Context of analysis containing the parsed tree.
-