org.sonar.api.batch.sensor
Interface SensorDescriptor

All Known Implementing Classes:
DefaultSensorDescriptor

@Beta
public interface SensorDescriptor

Describe what an Sensor is doing. Information may be used by the platform to log interesting information or perform some optimization.

Since:
4.4

Method Summary
 SensorDescriptor createIssuesForRuleRepositories(String... repositoryKeys)
          List InputFile.Type this Sensor work on.
 SensorDescriptor dependsOn(Metric<?>... metrics)
          List Metric this Sensor depends on.
 SensorDescriptor name(String name)
          Name of the Sensor.
 SensorDescriptor provides(Metric<?>... metrics)
          List Metric this Sensor provides.
 SensorDescriptor workOnFileTypes(InputFile.Type... types)
          List InputFile.Type this Sensor work on.
 SensorDescriptor workOnLanguages(String... languageKeys)
          List languages this Sensor work on.
 

Method Detail

name

SensorDescriptor name(String name)
Name of the Sensor. Will be displayed in logs.


dependsOn

SensorDescriptor dependsOn(Metric<?>... metrics)
List Metric this Sensor depends on. Will be used to execute sensors in correct order.


provides

SensorDescriptor provides(Metric<?>... metrics)
List Metric this Sensor provides. Will be used to execute sensors in correct order.


workOnLanguages

SensorDescriptor workOnLanguages(String... languageKeys)
List languages this Sensor work on. May be used by the platform to skip execution of the Sensor when no file for given languages are present in the project. If no language is provided then it will be executed for all languages.


workOnFileTypes

SensorDescriptor workOnFileTypes(InputFile.Type... types)
List InputFile.Type this Sensor work on. May be used by the platform to skip execution of the Sensor when no file for given type are present in the project. If you don't call this method then it means sensor is working on all input file types.


createIssuesForRuleRepositories

SensorDescriptor createIssuesForRuleRepositories(String... repositoryKeys)
List InputFile.Type this Sensor work on. May be used by the platform to skip execution of the Sensor when no file for given type are present in the project. If not type is provided then it will be executed for all types.



Copyright © 2009–2015 SonarSource. All rights reserved.