Package org.sonar.api.ce.measure
Interface MeasureComputer.MeasureComputerDefinition.Builder
-
- All Known Implementing Classes:
TestMeasureComputerDefinition.MeasureComputerDefinitionBuilderImpl
- Enclosing interface:
- MeasureComputer.MeasureComputerDefinition
public static interface MeasureComputer.MeasureComputerDefinition.Builder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MeasureComputer.MeasureComputerDefinition
build()
MeasureComputer.MeasureComputerDefinition.Builder
setInputMetrics(java.lang.String... inputMetrics)
List of metric keys of the measures that will be loaded by this computer.MeasureComputer.MeasureComputerDefinition.Builder
setOutputMetrics(java.lang.String... outputMetrics)
List of metric keys of the measures that can be added by this computer.
-
-
-
Method Detail
-
setInputMetrics
MeasureComputer.MeasureComputerDefinition.Builder setInputMetrics(java.lang.String... inputMetrics)
List of metric keys of the measures that will be loaded by this computer. It can be empty (for instance when only issues are needed). A metric must be either aCoreMetrics
or a metric provided byMetrics
- Throws:
java.lang.NullPointerException
- if inputMetrics is nulljava.lang.NullPointerException
- if the metrics contains anull
-
setOutputMetrics
MeasureComputer.MeasureComputerDefinition.Builder setOutputMetrics(java.lang.String... outputMetrics)
List of metric keys of the measures that can be added by this computer. At least one metric key must be defined. At runtime, the following conditions will be validated :- A metric must be defined by
Metrics
- A metric cannot be a
CoreMetrics
- A metric must be generated by only one
MeasureComputer
- Throws:
java.lang.NullPointerException
- if outputMetrics is nulljava.lang.IllegalArgumentException
- if there's not at least one output metricsjava.lang.NullPointerException
- if the metrics contains anull
- A metric must be defined by
-
build
MeasureComputer.MeasureComputerDefinition build()
- Throws:
java.lang.NullPointerException
- if inputMetrics is nulljava.lang.NullPointerException
- if inputs metrics contains anull
java.lang.NullPointerException
- if outputMetrics is nulljava.lang.IllegalArgumentException
- if there's not at least one output metricsjava.lang.NullPointerException
- if outputs metrics contains anull
-
-