org.sonar.api.batch
Class AbstractDivisionDecorator

java.lang.Object
  extended by org.sonar.api.batch.AbstractDivisionDecorator
All Implemented Interfaces:
CheckProject, Decorator, BatchExtension, Extension

public abstract class AbstractDivisionDecorator
extends java.lang.Object
implements Decorator


Constructor Summary
AbstractDivisionDecorator()
           
 
Method Summary
protected  double compute(Measure dividend, Measure divisor, boolean shouldResultBeInPercent)
           
 void decorate(Resource resource, DecoratorContext context)
           
 java.util.List<Metric> dependsUponMetrics()
           
 Metric generatesMetric()
           
protected abstract  Metric getDividendMetric()
           
protected abstract  Metric getDivisorMetric()
           
protected abstract  Metric getQuotientMetric()
           
protected  boolean shouldDecorateResource(DecoratorContext context)
           
 boolean shouldExecuteOnProject(Project project)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDivisionDecorator

public AbstractDivisionDecorator()
Method Detail

getQuotientMetric

protected abstract Metric getQuotientMetric()

getDivisorMetric

protected abstract Metric getDivisorMetric()

getDividendMetric

protected abstract Metric getDividendMetric()

dependsUponMetrics

public java.util.List<Metric> dependsUponMetrics()

generatesMetric

public Metric generatesMetric()

shouldExecuteOnProject

public boolean shouldExecuteOnProject(Project project)
Specified by:
shouldExecuteOnProject in interface CheckProject

decorate

public void decorate(Resource resource,
                     DecoratorContext context)
Specified by:
decorate in interface Decorator

shouldDecorateResource

protected boolean shouldDecorateResource(DecoratorContext context)

compute

protected double compute(Measure dividend,
                         Measure divisor,
                         boolean shouldResultBeInPercent)


Copyright © 2009 SonarSource SA. All Rights Reserved.