org.sonar.api.batch.sensor
Interface Sensor

All Superinterfaces:
BatchComponent, BatchExtension, Extension
All Known Implementing Classes:
ChecksSensor, CreateIssueByInternalKeySensor, MeasureSensor, OneIssueOnDirPerFileSensor, OneIssuePerLineSensor, RandomAccessSensor, ScmActivitySensor, SymbolReferencesSensor, SyntaxHighlightingSensor, XooTokenizerSensor

@Beta
public interface Sensor
extends BatchExtension

A sensor is invoked once during the analysis of a project. The sensor can parse a flat file, connect to a web server... Sensors are used to add measure and issues at file level.

For example the Cobertura Sensor parses Cobertura report and saves the first-level of measures on files.

Since:
4.4

Method Summary
 void describe(SensorDescriptor descriptor)
          Populate SensorDescriptor of this sensor.
 void execute(SensorContext context)
          The actual sensor code.
 

Method Detail

describe

void describe(SensorDescriptor descriptor)
Populate SensorDescriptor of this sensor.


execute

void execute(SensorContext context)
The actual sensor code.



Copyright © 2009–2015 SonarSource. All rights reserved.