org.sonar.api.batch.sensor.internal
Class DefaultSensorDescriptor

java.lang.Object
  extended by org.sonar.api.batch.sensor.internal.DefaultSensorDescriptor
All Implemented Interfaces:
SensorDescriptor

public class DefaultSensorDescriptor
extends Object
implements SensorDescriptor


Constructor Summary
DefaultSensorDescriptor()
           
 
Method Summary
 DefaultSensorDescriptor createIssuesForRuleRepositories(String... repositoryKeys)
          List InputFile.Type this Sensor work on.
 Metric[] dependsOn()
           
 DefaultSensorDescriptor dependsOn(Metric<?>... metrics)
          List Metric this Sensor depends on.
 Collection<String> languages()
           
 String name()
           
 DefaultSensorDescriptor name(String name)
          Name of the Sensor.
 Metric[] provides()
           
 DefaultSensorDescriptor provides(Metric<?>... metrics)
          List Metric this Sensor provides.
 Collection<String> ruleRepositories()
           
 Collection<InputFile.Type> types()
           
 DefaultSensorDescriptor workOnFileTypes(InputFile.Type... types)
          List InputFile.Type this Sensor work on.
 DefaultSensorDescriptor workOnLanguages(String... languageKeys)
          List languages this Sensor work on.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSensorDescriptor

public DefaultSensorDescriptor()
Method Detail

name

public String name()

dependsOn

public Metric[] dependsOn()

provides

public Metric[] provides()

languages

public Collection<String> languages()

types

public Collection<InputFile.Type> types()

ruleRepositories

public Collection<String> ruleRepositories()

name

public DefaultSensorDescriptor name(String name)
Description copied from interface: SensorDescriptor
Name of the Sensor. Will be displayed in logs.

Specified by:
name in interface SensorDescriptor

dependsOn

public DefaultSensorDescriptor dependsOn(Metric<?>... metrics)
Description copied from interface: SensorDescriptor
List Metric this Sensor depends on. Will be used to execute sensors in correct order.

Specified by:
dependsOn in interface SensorDescriptor

provides

public DefaultSensorDescriptor provides(Metric<?>... metrics)
Description copied from interface: SensorDescriptor
List Metric this Sensor provides. Will be used to execute sensors in correct order.

Specified by:
provides in interface SensorDescriptor

workOnLanguages

public DefaultSensorDescriptor workOnLanguages(String... languageKeys)
Description copied from interface: SensorDescriptor
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.

Specified by:
workOnLanguages in interface SensorDescriptor

workOnFileTypes

public DefaultSensorDescriptor workOnFileTypes(InputFile.Type... types)
Description copied from interface: SensorDescriptor
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.

Specified by:
workOnFileTypes in interface SensorDescriptor

createIssuesForRuleRepositories

public DefaultSensorDescriptor createIssuesForRuleRepositories(String... repositoryKeys)
Description copied from interface: SensorDescriptor
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.

Specified by:
createIssuesForRuleRepositories in interface SensorDescriptor


Copyright © 2009–2015 SonarSource. All rights reserved.