org.sonar.plugins.api.jobs
Class AbstractWeightingJob
java.lang.Object
org.sonar.plugins.api.jobs.AbstractJob
org.sonar.plugins.api.jobs.AbstractWeightingJob
- All Implemented Interfaces:
- Extension, Job
- Direct Known Subclasses:
- AverageClassComplexityJob, AverageFunctionComplexityJob
public abstract class AbstractWeightingJob
- extends AbstractJob
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractWeightingJob
public AbstractWeightingJob()
getTargetMetric
protected abstract Metric getTargetMetric()
getDivisorMetric
protected abstract Metric getDivisorMetric()
getDividendMetric
protected abstract Metric getDividendMetric()
execute
public void execute(Resource resource)
compute
protected double compute(Measure dividend,
Measure divisor)
dependsOnJobs
public java.util.List<java.lang.Class<? extends Job>> dependsOnJobs()
- Description copied from interface:
Job
- Dependent jobs for the same scope
- Specified by:
dependsOnJobs in interface Job- Overrides:
dependsOnJobs in class AbstractJob
- Returns:
- empty list if no dependencies
dependsOnMetrics
public java.util.List<Metric> dependsOnMetrics()
- Description copied from interface:
Job
- Depends of another measures on the same scope.
- Specified by:
dependsOnMetrics in interface Job- Overrides:
dependsOnMetrics in class AbstractJob
- Returns:
- empty list if no dependencies
generatesMetrics
public java.util.List<Metric> generatesMetrics()
- Specified by:
generatesMetrics in interface Job- Overrides:
generatesMetrics in class AbstractJob
- Returns:
- empty list if the job does not calculate measures
Copyright © 2008 SonarSource SA. All Rights Reserved.