Package org.sonar.api.ce.measure
Interface MeasureComputer.MeasureComputerContext
-
- All Known Implementing Classes:
TestMeasureComputerContext
- Enclosing interface:
- MeasureComputer
public static interface MeasureComputer.MeasureComputerContextContext specific to the computation of the measure(s) of a given component
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddMeasure(java.lang.String metric, boolean value)Add a new measure of a given metric which measure type will be booleanvoidaddMeasure(java.lang.String metric, double value)Add a new measure of a given metric which measure type will be doublevoidaddMeasure(java.lang.String metric, int value)Add a new measure of a given metric which measure type will be intvoidaddMeasure(java.lang.String metric, long value)Add a new measure of a given metric which measure type will be longvoidaddMeasure(java.lang.String metric, java.lang.String value)Add a new measure of a given metric which measure type will be stringjava.lang.Iterable<Measure>getChildrenMeasures(java.lang.String metric)Returns measures from a given metric on children of the current component.ComponentgetComponent()Returns the current component.java.util.List<? extends Issue>getIssues()Return list of all issues (open, closed, etc.) of current component.MeasuregetMeasure(java.lang.String metric)Returns the measure from a given metric on the current component.SettingsgetSettings()Returns settings of the current component.
-
-
-
Method Detail
-
getComponent
Component getComponent()
Returns the current component.
-
getSettings
Settings getSettings()
Returns settings of the current component.
-
getMeasure
@CheckForNull Measure getMeasure(java.lang.String metric)
Returns the measure from a given metric on the current component.- Throws:
java.lang.IllegalArgumentException- if the metric is not listed inMeasureComputer.MeasureComputerDefinition.getInputMetrics()
-
getChildrenMeasures
java.lang.Iterable<Measure> getChildrenMeasures(java.lang.String metric)
Returns measures from a given metric on children of the current component. It no measure is found for a child, this measure is ignored- Throws:
java.lang.IllegalArgumentException- if the metric is not listed inMeasureComputer.MeasureComputerDefinition.getInputMetrics()or inMeasureComputer.MeasureComputerDefinition.getOutputMetrics()
-
addMeasure
void addMeasure(java.lang.String metric, int value)Add a new measure of a given metric which measure type will be int- Throws:
java.lang.IllegalArgumentException- if the metric is not listed inMeasureComputer.MeasureComputerDefinition.getOutputMetrics()java.lang.UnsupportedOperationException- if a measure for the specified metric already exists for the current component
-
addMeasure
void addMeasure(java.lang.String metric, double value)Add a new measure of a given metric which measure type will be double- Throws:
java.lang.IllegalArgumentException- if the metric is not listed inMeasureComputer.MeasureComputerDefinition.getOutputMetrics()java.lang.UnsupportedOperationException- if a measure for the specified metric already exists for the current component
-
addMeasure
void addMeasure(java.lang.String metric, long value)Add a new measure of a given metric which measure type will be long- Throws:
java.lang.IllegalArgumentException- if the metric is not listed inMeasureComputer.MeasureComputerDefinition.getOutputMetrics()java.lang.UnsupportedOperationException- if a measure for the specified metric already exists for the current component
-
addMeasure
void addMeasure(java.lang.String metric, java.lang.String value)Add a new measure of a given metric which measure type will be string- Throws:
java.lang.IllegalArgumentException- if the metric is not listed inMeasureComputer.MeasureComputerDefinition.getOutputMetrics()java.lang.UnsupportedOperationException- if a measure for the specified metric already exists for the current component
-
addMeasure
void addMeasure(java.lang.String metric, boolean value)Add a new measure of a given metric which measure type will be boolean- Throws:
java.lang.IllegalArgumentException- if the metric is not listed inMeasureComputer.MeasureComputerDefinition.getOutputMetrics()java.lang.UnsupportedOperationException- if a measure for the specified metric already exists for the current component
-
getIssues
java.util.List<? extends Issue> getIssues()
Return list of all issues (open, closed, etc.) of current component.
-
-