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, ServerExtension
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(Languages languages)
getTargetMetric
protected abstract Metric getTargetMetric()
getDivisorMetric
protected abstract Metric getDivisorMetric()
getDividendMetric
protected abstract Metric getDividendMetric()
execute
public void execute(JobContext jobContext)
- Description copied from interface:
Job
- Executed on filtered resources only.
compute
protected double compute(Measure dividend,
Measure divisor,
boolean shouldResultBeInPercent)
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 for the same scope of resources.
- Specified by:
dependsOnMetrics
in interface Job
- Overrides:
dependsOnMetrics
in class AbstractJob
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 © 2009 SonarSource SA. All Rights Reserved.