org.sonar.plugins.api.jobs
Class AbstractWeightingJob

java.lang.Object
  extended by org.sonar.plugins.api.jobs.AbstractJob
      extended by org.sonar.plugins.api.jobs.AbstractWeightingJob
All Implemented Interfaces:
Extension, Job

public abstract class AbstractWeightingJob
extends AbstractJob


Constructor Summary
AbstractWeightingJob()
           
 
Method Summary
protected  double compute(Measure dividend, Measure divisor)
           
 java.util.List<java.lang.Class<? extends Job>> dependsOnJobs()
          Dependent jobs for the same scope
 java.util.List<ch.hortis.sonar.model.Metric> dependsOnMetrics()
          Depends of another measures on the same scope.
 void execute(Resource resource)
           
 java.util.List<ch.hortis.sonar.model.Metric> generatesMetrics()
           
protected abstract  ch.hortis.sonar.model.Metric getDividendMetric()
           
protected abstract  ch.hortis.sonar.model.Metric getDivisorMetric()
           
protected abstract  ch.hortis.sonar.model.Metric getTargetMetric()
           
 
Methods inherited from class org.sonar.plugins.api.jobs.AbstractJob
shouldExecuteOnLanguage, shouldExecuteOnProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.sonar.plugins.api.jobs.Job
shouldExecuteOnResource
 

Constructor Detail

AbstractWeightingJob

public AbstractWeightingJob()
Method Detail

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<ch.hortis.sonar.model.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

execute

public void execute(Resource resource)

generatesMetrics

public java.util.List<ch.hortis.sonar.model.Metric> generatesMetrics()
Specified by:
generatesMetrics in interface Job
Overrides:
generatesMetrics in class AbstractJob
Returns:
empty list if the job does not calculate measures

getDividendMetric

protected abstract ch.hortis.sonar.model.Metric getDividendMetric()

getDivisorMetric

protected abstract ch.hortis.sonar.model.Metric getDivisorMetric()

getTargetMetric

protected abstract ch.hortis.sonar.model.Metric getTargetMetric()


Copyright © 2008-2009 SonarSource SA. All Rights Reserved.