org.sonar.plugins.cpd.decorators
Class SumDuplicationsDecorator

java.lang.Object
  extended by org.sonar.api.batch.AbstractSumChildrenDecorator
      extended by org.sonar.plugins.cpd.decorators.SumDuplicationsDecorator
All Implemented Interfaces:
CheckProject, Decorator, BatchComponent, BatchExtension, Extension

public class SumDuplicationsDecorator
extends AbstractSumChildrenDecorator


Constructor Summary
SumDuplicationsDecorator()
           
 
Method Summary
 List<Metric> generatesMetrics()
          Each metric is used individually.
 boolean shouldDecorateResource(Resource resource)
           
 boolean shouldExecuteOnProject(Project project)
          
protected  boolean shouldSaveZeroIfNoChildMeasures()
           
 
Methods inherited from class org.sonar.api.batch.AbstractSumChildrenDecorator
decorate, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SumDuplicationsDecorator

public SumDuplicationsDecorator()
Method Detail

generatesMetrics

public List<Metric> generatesMetrics()
Description copied from class: AbstractSumChildrenDecorator
Each metric is used individually. There are as many generated measures than metrics.

Important : annotations are not inherited, so you have to copy the @DependedUpon annotation when implementing this method.

Specified by:
generatesMetrics in class AbstractSumChildrenDecorator
Returns:
not null list of metrics

shouldSaveZeroIfNoChildMeasures

protected boolean shouldSaveZeroIfNoChildMeasures()
Specified by:
shouldSaveZeroIfNoChildMeasures in class AbstractSumChildrenDecorator
Returns:
whether it should save zero if no child measures

shouldExecuteOnProject

public boolean shouldExecuteOnProject(Project project)
Description copied from class: AbstractSumChildrenDecorator

Specified by:
shouldExecuteOnProject in interface CheckProject
Overrides:
shouldExecuteOnProject in class AbstractSumChildrenDecorator

shouldDecorateResource

public boolean shouldDecorateResource(Resource resource)
Overrides:
shouldDecorateResource in class AbstractSumChildrenDecorator
Returns:
whether the resource should be decorated or not


Copyright © 2009-2012 SonarSource. All Rights Reserved.