Class DefaultJavaResourceLocator

    • Constructor Detail

      • DefaultJavaResourceLocator

        public DefaultJavaResourceLocator​(org.sonar.api.batch.fs.FileSystem fs,
                                          JavaClasspath javaClasspath)
    • Method Detail

      • setSensorContext

        public void setSensorContext​(org.sonar.api.batch.sensor.SensorContext sensorContext)
      • findResourceByClassName

        public org.sonar.api.batch.fs.InputFile findResourceByClassName​(String className)
        Description copied from interface: JavaResourceLocator
        Retrieve a SonarQube resource by the class name.
        Specified by:
        findResourceByClassName in interface JavaResourceLocator
        Parameters:
        className - fully qualified name of the analyzed class
        Returns:
        null if not found
      • classpath

        public Collection<File> classpath()
        Description copied from interface: JavaResourceLocator
        Classpath configured for the project. This classpath method is used by the findbugs plugin to configure the analysis.
        Specified by:
        classpath in interface JavaResourceLocator
        Returns:
        the list of jar and class files constituting the classpath of the analyzed project.
      • scanFile

        public void scanFile​(JavaFileScannerContext context)
        Description copied from interface: JavaFileScanner
        Method called after parsing and semantic analysis has been done on file.
        Specified by:
        scanFile in interface JavaFileScanner
        Parameters:
        context - Context of analysis containing the parsed tree.