Package | Description |
---|---|
org.sonar.api.batch | |
org.sonar.api.database.daos | |
org.sonar.api.database.model | |
org.sonar.api.measures | |
org.sonar.api.profiles |
Modifier and Type | Method and Description |
---|---|
Metric |
AbstractFunctionComplexityDecorator.generateFileComplexityMetric()
Deprecated.
Used to define downstream dependencies
|
Metric |
AbstractFileComplexityDecorator.generateFileComplexityMetric()
Deprecated.
Used to define downstream dependencies
|
Metric |
AbstractDivisionDecorator.generatesMetric()
Used to define downstream dependencies
|
Metric |
AbstractFunctionComplexityDistributionDecorator.generatesMetrics()
Deprecated.
|
protected abstract Metric |
AbstractDivisionDecorator.getDividendMetric() |
protected abstract Metric |
AbstractDivisionDecorator.getDivisorMetric() |
protected abstract Metric |
AbstractDivisionDecorator.getQuotientMetric() |
Metric |
DefaultFormulaContext.getTargetMetric() |
Modifier and Type | Method and Description |
---|---|
List<Metric> |
AbstractFunctionComplexityDecorator.dependsUponFileAndComplexityMetrics()
Deprecated.
Used to define upstream dependencies
|
List<Metric> |
AbstractFileComplexityDecorator.dependsUponFileAndComplexityMetrics()
Deprecated.
Used to define upstream dependencies
|
List<Metric> |
AbstractDivisionDecorator.dependsUponMetrics()
Used to define upstream dependencies
|
abstract List<Metric> |
AbstractSumChildrenDecorator.generatesMetrics()
Each metric is used individually.
|
List<Metric> |
TimeMachineQuery.getMetrics() |
Modifier and Type | Method and Description |
---|---|
Collection<Measure> |
DefaultFormulaData.getChildrenMeasures(Metric metric) |
Collection<Measure> |
DecoratorContext.getChildrenMeasures(Metric metric) |
Measure |
SensorContext.getMeasure(Metric metric)
Find a project measure
|
Measure |
DefaultFormulaData.getMeasure(Metric metric) |
Measure |
DecoratorContext.getMeasure(Metric metric)
Find a measure for the resource
|
abstract Measure |
SonarIndex.getMeasure(Resource resource,
Metric metric) |
Measure |
SensorContext.getMeasure(Resource resource,
Metric metric)
Find a measure for this project
|
Measure |
SensorContext.saveMeasure(Metric metric,
Double value)
Add a measure on project
|
DecoratorContext |
DecoratorContext.saveMeasure(Metric metric,
Double value)
Add a measure on the current resource.
|
Measure |
SensorContext.saveMeasure(Resource resource,
Metric metric,
Double value)
Add or update a measure.
|
void |
DefaultFormulaContext.setMetric(Metric metric) |
TimeMachineQuery |
TimeMachineQuery.setMetrics(Metric... metrics)
Sets the metrics to return
|
Modifier and Type | Method and Description |
---|---|
TimeMachineQuery |
TimeMachineQuery.setMetrics(List<Metric> metrics)
Sets the metrics to return
|
Constructor and Description |
---|
DefaultFormulaContext(Metric metric) |
Modifier and Type | Method and Description |
---|---|
Metric |
MeasuresDao.getMetric(Metric metric)
Deprecated.
|
Metric |
MeasuresDao.getMetric(String metricName)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
Collection<Metric> |
MeasuresDao.getEnabledMetrics()
Deprecated.
|
Collection<Metric> |
MeasuresDao.getMetrics()
Deprecated.
|
List<Metric> |
MeasuresDao.getMetrics(List<Metric> metrics)
Deprecated.
|
Collection<Metric> |
MeasuresDao.getUserDefinedMetrics()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
Metric |
MeasuresDao.getMetric(Metric metric)
Deprecated.
|
void |
MeasuresDao.persistMetric(Metric metric)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
MeasuresDao.disabledMetrics(Collection<Metric> metrics)
Deprecated.
|
List<Metric> |
MeasuresDao.getMetrics(List<Metric> metrics)
Deprecated.
|
void |
MeasuresDao.registerMetrics(Collection<Metric> metrics)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
String |
MeasureModel.getData(Metric metric) |
Modifier and Type | Field and Description |
---|---|
static Metric |
CoreMetrics.ABSTRACTNESS |
static Metric |
CoreMetrics.ACCESSORS |
static Metric |
CoreMetrics.ACTIVE_REVIEWS |
static Metric |
CoreMetrics.AFFERENT_COUPLINGS |
static Metric |
CoreMetrics.ALERT_STATUS |
static Metric |
CoreMetrics.BLOCKER_VIOLATIONS |
static Metric |
CoreMetrics.BRANCH_COVERAGE |
static Metric |
CoreMetrics.BRANCH_COVERAGE_HITS_DATA
Deprecated.
in 2.7. Replaced by metrics
CoreMetrics.CONDITIONS_BY_LINE and CoreMetrics.COVERED_CONDITIONS_BY_LINE |
static Metric |
CoreMetrics.CLASS_COMPLEXITY |
static Metric |
CoreMetrics.CLASS_COMPLEXITY_DISTRIBUTION
Deprecated.
in 3.0 - see SONAR-3289
|
static Metric |
CoreMetrics.CLASSES |
static Metric |
CoreMetrics.COMMENT_BLANK_LINES
Deprecated.
since 3.3 - see SONAR-3768
|
static Metric |
CoreMetrics.COMMENT_LINES |
static Metric |
CoreMetrics.COMMENT_LINES_DATA
Information about comments in file.
|
static Metric |
CoreMetrics.COMMENT_LINES_DENSITY |
static Metric |
CoreMetrics.COMMENTED_OUT_CODE_LINES |
static Metric |
CoreMetrics.COMPLEXITY |
static Metric |
CoreMetrics.CONDITIONS_BY_LINE
Use
CoverageMeasuresBuilder to build measure for this metric. |
static Metric |
CoreMetrics.CONDITIONS_TO_COVER
Use
CoverageMeasuresBuilder to build measure for this metric. |
static Metric |
CoreMetrics.COVERAGE |
static Metric |
CoreMetrics.COVERAGE_LINE_HITS_DATA
Key-value pairs, where key - is a number of line, and value - is a number of hits for this line.
|
static Metric |
CoreMetrics.COVERED_CONDITIONS_BY_LINE
Use
CoverageMeasuresBuilder to build measure for this metric. |
static Metric |
CoreMetrics.CRITICAL_VIOLATIONS |
static Metric |
CoreMetrics.DEPENDENCY_MATRIX |
static Metric |
CoreMetrics.DEPTH_IN_TREE |
static Metric |
CoreMetrics.DIRECTORIES |
static Metric |
CoreMetrics.DISTANCE |
static Metric |
CoreMetrics.DUPLICATED_BLOCKS |
static Metric |
CoreMetrics.DUPLICATED_FILES
For files: if it contains duplicates, then 1, otherwise 0.
|
static Metric |
CoreMetrics.DUPLICATED_LINES |
static Metric |
CoreMetrics.DUPLICATED_LINES_DENSITY |
static Metric |
CoreMetrics.DUPLICATIONS_DATA
Information about duplications, which is represented as an XML string.
|
static Metric |
CoreMetrics.EFFERENT_COUPLINGS |
static Metric |
CoreMetrics.EFFICIENCY
Deprecated.
since 2.5 See SONAR-2007
|
static Metric |
CoreMetrics.FALSE_POSITIVE_REVIEWS |
static Metric |
CoreMetrics.FILE_COMPLEXITY |
static Metric |
CoreMetrics.FILE_COMPLEXITY_DISTRIBUTION |
static Metric |
CoreMetrics.FILE_CYCLES |
static Metric |
CoreMetrics.FILE_EDGES_WEIGHT |
static Metric |
CoreMetrics.FILE_FEEDBACK_EDGES |
static Metric |
CoreMetrics.FILE_TANGLE_INDEX |
static Metric |
CoreMetrics.FILE_TANGLES |
static Metric |
CoreMetrics.FILES |
static Metric |
CoreMetrics.FUNCTION_COMPLEXITY |
static Metric |
CoreMetrics.FUNCTION_COMPLEXITY_DISTRIBUTION |
static Metric |
CoreMetrics.FUNCTIONS |
static Metric |
CoreMetrics.GENERATED_LINES |
static Metric |
CoreMetrics.GENERATED_NCLOC |
static Metric |
CoreMetrics.INFO_VIOLATIONS |
static Metric |
CoreMetrics.INSTABILITY |
static Metric |
CoreMetrics.IT_BRANCH_COVERAGE |
static Metric |
CoreMetrics.IT_CONDITIONS_BY_LINE |
static Metric |
CoreMetrics.IT_CONDITIONS_TO_COVER |
static Metric |
CoreMetrics.IT_COVERAGE |
static Metric |
CoreMetrics.IT_COVERAGE_LINE_HITS_DATA |
static Metric |
CoreMetrics.IT_COVERED_CONDITIONS_BY_LINE |
static Metric |
CoreMetrics.IT_LINE_COVERAGE |
static Metric |
CoreMetrics.IT_LINES_TO_COVER |
static Metric |
CoreMetrics.IT_UNCOVERED_CONDITIONS |
static Metric |
CoreMetrics.IT_UNCOVERED_LINES |
static Metric |
CoreMetrics.LCOM4 |
static Metric |
CoreMetrics.LCOM4_BLOCKS |
static Metric |
CoreMetrics.LCOM4_DISTRIBUTION |
static Metric |
CoreMetrics.LINE_COVERAGE |
static Metric |
CoreMetrics.LINES |
static Metric |
CoreMetrics.LINES_TO_COVER
Use
CoverageMeasuresBuilder to build measure for this metric. |
static Metric |
CoreMetrics.MAINTAINABILITY
Deprecated.
since 2.5 See SONAR-2007
|
static Metric |
CoreMetrics.MAJOR_VIOLATIONS |
protected Metric |
Measure.metric |
static Metric |
CoreMetrics.MINOR_VIOLATIONS |
static Metric |
CoreMetrics.NCLOC |
static Metric |
CoreMetrics.NCLOC_DATA
Information about lines of code in file.
|
static Metric |
CoreMetrics.NEW_BLOCKER_VIOLATIONS |
static Metric |
CoreMetrics.NEW_BRANCH_COVERAGE |
static Metric |
CoreMetrics.NEW_CONDITIONS_TO_COVER |
static Metric |
CoreMetrics.NEW_COVERAGE |
static Metric |
CoreMetrics.NEW_CRITICAL_VIOLATIONS |
static Metric |
CoreMetrics.NEW_INFO_VIOLATIONS |
static Metric |
CoreMetrics.NEW_IT_BRANCH_COVERAGE |
static Metric |
CoreMetrics.NEW_IT_CONDITIONS_TO_COVER |
static Metric |
CoreMetrics.NEW_IT_COVERAGE |
static Metric |
CoreMetrics.NEW_IT_LINE_COVERAGE |
static Metric |
CoreMetrics.NEW_IT_LINES_TO_COVER |
static Metric |
CoreMetrics.NEW_IT_UNCOVERED_CONDITIONS |
static Metric |
CoreMetrics.NEW_IT_UNCOVERED_LINES |
static Metric |
CoreMetrics.NEW_LINE_COVERAGE |
static Metric |
CoreMetrics.NEW_LINES_TO_COVER |
static Metric |
CoreMetrics.NEW_MAJOR_VIOLATIONS |
static Metric |
CoreMetrics.NEW_MINOR_VIOLATIONS |
static Metric |
CoreMetrics.NEW_OVERALL_BRANCH_COVERAGE |
static Metric |
CoreMetrics.NEW_OVERALL_CONDITIONS_TO_COVER |
static Metric |
CoreMetrics.NEW_OVERALL_COVERAGE |
static Metric |
CoreMetrics.NEW_OVERALL_LINE_COVERAGE |
static Metric |
CoreMetrics.NEW_OVERALL_LINES_TO_COVER |
static Metric |
CoreMetrics.NEW_OVERALL_UNCOVERED_CONDITIONS |
static Metric |
CoreMetrics.NEW_OVERALL_UNCOVERED_LINES |
static Metric |
CoreMetrics.NEW_UNCOVERED_CONDITIONS |
static Metric |
CoreMetrics.NEW_UNCOVERED_LINES |
static Metric |
CoreMetrics.NEW_UNREVIEWED_VIOLATIONS |
static Metric |
CoreMetrics.NEW_VIOLATIONS |
static Metric |
CoreMetrics.NUMBER_OF_CHILDREN |
static Metric |
CoreMetrics.OVERALL_BRANCH_COVERAGE |
static Metric |
CoreMetrics.OVERALL_CONDITIONS_BY_LINE |
static Metric |
CoreMetrics.OVERALL_CONDITIONS_TO_COVER |
static Metric |
CoreMetrics.OVERALL_COVERAGE |
static Metric |
CoreMetrics.OVERALL_COVERAGE_LINE_HITS_DATA |
static Metric |
CoreMetrics.OVERALL_COVERED_CONDITIONS_BY_LINE |
static Metric |
CoreMetrics.OVERALL_LINE_COVERAGE |
static Metric |
CoreMetrics.OVERALL_LINES_TO_COVER |
static Metric |
CoreMetrics.OVERALL_UNCOVERED_CONDITIONS |
static Metric |
CoreMetrics.OVERALL_UNCOVERED_LINES |
static Metric |
CoreMetrics.PACKAGE_CYCLES |
static Metric |
CoreMetrics.PACKAGE_EDGES_WEIGHT |
static Metric |
CoreMetrics.PACKAGE_FEEDBACK_EDGES |
static Metric |
CoreMetrics.PACKAGE_TANGLE_INDEX |
static Metric |
CoreMetrics.PACKAGE_TANGLES |
static Metric |
CoreMetrics.PACKAGES |
static Metric |
CoreMetrics.PARAGRAPH_COMPLEXITY
Deprecated.
since Sonar 2.14 - See SONAR-3239
|
static Metric |
CoreMetrics.PARAGRAPH_COMPLEXITY_DISTRIBUTION
Deprecated.
since Sonar 2.14 - See SONAR-3239
|
static Metric |
CoreMetrics.PARAGRAPHS
Deprecated.
since Sonar 2.14 - See SONAR-3239
|
static Metric |
CoreMetrics.PORTABILITY
Deprecated.
since 2.5 See SONAR-2007
|
static Metric |
CoreMetrics.PROFILE |
static Metric |
CoreMetrics.PROFILE_VERSION |
static Metric |
CoreMetrics.PROJECTS |
static Metric |
CoreMetrics.PUBLIC_API |
static Metric |
CoreMetrics.PUBLIC_DOCUMENTED_API_DENSITY |
static Metric |
CoreMetrics.PUBLIC_UNDOCUMENTED_API |
static Metric |
CoreMetrics.RELIABILITY
Deprecated.
since 2.5 See SONAR-2007
|
static Metric |
CoreMetrics.RFC |
static Metric |
CoreMetrics.RFC_DISTRIBUTION |
static Metric |
CoreMetrics.SCM_AUTHORS_BY_LINE
Key-value pairs, where key - is a number of line, and value - is an author for this line.
|
static Metric |
CoreMetrics.SCM_LAST_COMMIT_DATETIMES_BY_LINE
Key-value pairs, where key - is a number of line, and value - is a date of last commit for this line.
|
static Metric |
CoreMetrics.SCM_REVISIONS_BY_LINE
Key-value pairs, where key - is a number of line, and value - is a revision for this line.
|
static Metric |
CoreMetrics.SKIPPED_TESTS |
static Metric |
CoreMetrics.STATEMENTS |
static Metric |
CoreMetrics.SUSPECT_LCOM4_DENSITY |
static Metric |
CoreMetrics.TEST_DATA |
static Metric |
CoreMetrics.TEST_ERRORS |
static Metric |
CoreMetrics.TEST_EXECUTION_TIME |
static Metric |
CoreMetrics.TEST_FAILURES |
static Metric |
CoreMetrics.TEST_SUCCESS_DENSITY |
static Metric |
CoreMetrics.TESTS
Value of measure for this metric can be saved from Sensor, taking into account following rules:
If tool (like Maven Surefire Plugin) has not been activated to run unit tests, then Sensor should not save anything.
|
static Metric |
CoreMetrics.UNASSIGNED_REVIEWS |
static Metric |
CoreMetrics.UNCOVERED_CONDITIONS
Use
CoverageMeasuresBuilder to build measure for this metric. |
static Metric |
CoreMetrics.UNCOVERED_LINES
Use
CoverageMeasuresBuilder to build measure for this metric. |
static Metric |
CoreMetrics.UNPLANNED_REVIEWS |
static Metric |
CoreMetrics.UNREVIEWED_VIOLATIONS |
static Metric |
CoreMetrics.USABILITY
Deprecated.
since 2.5 See SONAR-2007
|
static Metric |
CoreMetrics.VIOLATIONS |
static Metric |
CoreMetrics.VIOLATIONS_DENSITY |
static Metric |
CoreMetrics.WEIGHTED_VIOLATIONS |
Modifier and Type | Field and Description |
---|---|
static List<Metric> |
CoverageMeasuresBuilder.METRICS
Metrics of generated measures
|
Modifier and Type | Method and Description |
---|---|
Metric |
Metric.Builder.create()
Creates a new metric definition based on the properties set on this metric builder.
|
Metric |
MetricFinder.findById(int id) |
Metric |
MetricFinder.findByKey(String key) |
Metric |
PropertiesBuilder.getMetric() |
Metric |
Measure.getMetric() |
Metric |
FormulaContext.getTargetMetric() |
Metric |
Metric.merge(Metric with)
Merge with fields from other metric.
|
Metric |
Metric.setBestValue(Double bestValue) |
Metric |
Metric.setDescription(String description)
Sets the metric description
|
Metric |
Metric.setDirection(Integer direction)
Sets the metric direction.
|
Metric |
Metric.setDomain(String domain)
Sets the domain for the metric (General, Complexity...)
|
Metric |
Metric.setEnabled(Boolean enabled)
Sets whether the metric is enabled
|
Metric |
Metric.setFormula(Formula formula)
Sets the metric formula
|
Metric |
Metric.setHidden(Boolean hidden) |
Metric |
Metric.setId(Integer id)
For internal use only
|
Metric |
Metric.setKey(String key)
Sets the metric key
|
Metric |
Metric.setName(String name)
Sets the metric name
|
Metric |
Metric.setOptimizedBestValue(Boolean b) |
Metric |
Metric.setOrigin(Metric.Origin origin)
Set the origin of the metric - Internal use only
|
Metric |
Metric.setQualitative(Boolean qualitative)
Sets whether the metric is qualitative
|
Metric |
Metric.setType(Metric.ValueType type)
Sets the metric type
|
Metric |
Metric.setUserManaged(Boolean userManaged)
Sets whether the metric is managed by users ("manual metric")
|
Metric |
Metric.setWorstValue(Double d) |
Modifier and Type | Method and Description |
---|---|
List<Metric> |
WeightedMeanAggregationFormula.dependsUponMetrics() |
List<Metric> |
SumChildValuesFormula.dependsUponMetrics() |
List<Metric> |
SumChildDistributionFormula.dependsUponMetrics() |
List<Metric> |
MeanAggregationFormula.dependsUponMetrics() |
List<Metric> |
Formula.dependsUponMetrics() |
List<Metric> |
AverageFormula.dependsUponMetrics() |
Collection<Metric> |
MetricFinder.findAll() |
Collection<Metric> |
MetricFinder.findAll(List<String> metricKeys) |
List<Metric> |
Metrics.getMetrics() |
static List<Metric> |
CoreMetrics.getMetrics() |
Modifier and Type | Method and Description |
---|---|
static MeasuresFilter<Measure> |
MeasuresFilters.characteristic(Metric metric,
Characteristic characteristic) |
static AverageFormula |
AverageFormula.create(Metric main,
Metric by)
Creates a new
AverageFormula class. |
static RuleMeasure |
RuleMeasure.createForCategory(Metric metric,
Integer category,
Double value)
Deprecated.
since 2.5. See SONAR-2007.
|
static RuleMeasure |
RuleMeasure.createForPriority(Metric metric,
RulePriority priority,
Double value) |
static RuleMeasure |
RuleMeasure.createForRule(Metric metric,
Rule rule,
Double value) |
Collection<Measure> |
FormulaData.getChildrenMeasures(Metric metric) |
Measure |
FormulaData.getMeasure(Metric metric) |
Metric |
Metric.merge(Metric with)
Merge with fields from other metric.
|
static MeasuresFilter<Measure> |
MeasuresFilters.metric(Metric metric) |
static MeasuresFilter<RuleMeasure> |
MeasuresFilters.rule(Metric metric,
Rule rule) |
static MeasuresFilter<Collection<RuleMeasure>> |
MeasuresFilters.ruleCategories(Metric metric)
Deprecated.
since 2.5. See http://jira.codehaus.org/browse/SONAR-2007
|
static MeasuresFilter<RuleMeasure> |
MeasuresFilters.ruleCategory(Metric metric,
Integer category)
Deprecated.
since 2.5. See http://jira.codehaus.org/browse/SONAR-2007
|
static MeasuresFilter<Collection<RuleMeasure>> |
MeasuresFilters.rules(Metric metric) |
PropertiesBuilder<K,V> |
PropertiesBuilder.setMetric(Metric metric) |
Measure |
Measure.setMetric(Metric metric)
Set the underlying metric
|
Constructor and Description |
---|
AverageComplexityFormula(Metric byMetric)
Deprecated.
|
CountDistributionBuilder(Metric metric)
Creates an empty CountDistributionBuilder for a specified metric
|
Measure(Metric metric)
Creates a measure with a metric
|
Measure(Metric metric,
Double value)
Creates a measure with a metric and a value
|
Measure(Metric metric,
Double value,
int precision)
Creates a measure with a metric, a value and a precision for the value
|
Measure(Metric metric,
Double value,
String data)
Creates a measure with a metric, a value and a data field
|
Measure(Metric metric,
Metric.Level level)
Creates a measure with a metric and an alert level
|
Measure(Metric metric,
String data)
* Creates a measure with a metric and a data field
|
MeasuresFilters.MetricFilter(Metric metric) |
PropertiesBuilder(Metric metric) |
PropertiesBuilder(Metric metric,
Map<K,V> map) |
RangeDistributionBuilder(Metric metric) |
RangeDistributionBuilder(Metric metric,
Number[] bottomLimits)
RangeDistributionBuilder for a metric and a defined range
Each entry is initialized at zero
|
RuleMeasure(Metric metric,
Rule rule,
RulePriority rulePriority,
Integer ruleCategory)
This constructor is for internal use only.
|
WeightedMeanAggregationFormula(Metric weightingMetric,
boolean zeroIfNoValues) |
Modifier and Type | Method and Description |
---|---|
Metric |
Alert.getMetric() |
Modifier and Type | Method and Description |
---|---|
void |
Alert.setMetric(Metric metric)
Sets the alert metric
|
Constructor and Description |
---|
Alert(RulesProfile rulesProfile,
Metric metric,
String operator,
String valueError,
String valueWarning)
Creates an alert
|
Alert(RulesProfile rulesProfile,
Metric metric,
String operator,
String valueError,
String valueWarning,
Integer period)
Creates an alert
|
Copyright © 2009-2013 SonarSource. All Rights Reserved.