org.sonar.plugins.core.sensors
Class AbstractCoverageDecorator

java.lang.Object
  extended by org.sonar.plugins.core.sensors.AbstractCoverageDecorator
All Implemented Interfaces:
CheckProject, Decorator, BatchComponent, BatchExtension, Extension
Direct Known Subclasses:
BranchCoverageDecorator, CoverageDecorator, ItBranchCoverageDecorator, ItCoverageDecorator, ItLineCoverageDecorator, LineCoverageDecorator

public abstract class AbstractCoverageDecorator
extends Object
implements Decorator


Constructor Summary
AbstractCoverageDecorator()
           
 
Method Summary
protected abstract  long countCoveredElements(DecoratorContext context)
           
protected abstract  long countCoveredElementsForNewCode(DecoratorContext context, int periodIndex)
           
protected abstract  Long countElements(DecoratorContext context)
           
protected abstract  Long countElementsForNewCode(DecoratorContext context, int periodIndex)
           
 void decorate(Resource resource, DecoratorContext context)
           
 Collection<Metric> generatedMetrics()
           
protected abstract  Metric getGeneratedMetric()
           
protected abstract  Metric getGeneratedMetricForNewCode()
           
protected  boolean shouldDecorate(Resource resource, 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

AbstractCoverageDecorator

public AbstractCoverageDecorator()
Method Detail

shouldExecuteOnProject

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

generatedMetrics

public Collection<Metric> generatedMetrics()

decorate

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

shouldDecorate

protected boolean shouldDecorate(Resource resource,
                                 DecoratorContext context)

getGeneratedMetric

protected abstract Metric getGeneratedMetric()

countElements

protected abstract Long countElements(DecoratorContext context)

countCoveredElements

protected abstract long countCoveredElements(DecoratorContext context)

getGeneratedMetricForNewCode

protected abstract Metric getGeneratedMetricForNewCode()

countElementsForNewCode

protected abstract Long countElementsForNewCode(DecoratorContext context,
                                                int periodIndex)

countCoveredElementsForNewCode

protected abstract long countCoveredElementsForNewCode(DecoratorContext context,
                                                       int periodIndex)


Copyright © 2009-2012 SonarSource. All Rights Reserved.