Package org.sonar.java
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.InputFilefindResourceByClassName(String className) Retrieve a SonarQube resource by the class name.voidscanFile(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, waitMethods 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:JavaResourceLocatorRetrieve a SonarQube resource by the class name.- Specified by:
findResourceByClassNamein 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:
classFilesToAnalyzein interfaceJavaResourceLocator- Returns:
- a list of .class files corresponding to the source files to be analyzed.
-
classpath
Description copied from interface:JavaResourceLocatorClasspath configured for the project.- Specified by:
classpathin interfaceJavaResourceLocator- Returns:
- the list of jar and class files constituting the classpath of the analyzed project.
-
testClasspath
Description copied from interface:JavaResourceLocatorClasspath configured for the project tests.- Specified by:
testClasspathin interfaceJavaResourceLocator- Returns:
- the list of jar and class files constituting the classpath of the analyzed project.
-
binaryDirs
Description copied from interface:JavaResourceLocatorThe folders containing the binary .class files.- Specified by:
binaryDirsin interfaceJavaResourceLocator- Returns:
- a list of folders.
-
testBinaryDirs
Description copied from interface:JavaResourceLocatorThe folders containing the binary .class files corresponding to the tests.- Specified by:
testBinaryDirsin interfaceJavaResourceLocator- Returns:
- a list of folders.
-
scanFile
Description copied from interface:JavaFileScannerMethod called after parsing and semantic analysis has been done on file.- Specified by:
scanFilein interfaceJavaFileScanner- Parameters:
context- Context of analysis containing the parsed tree.
-