org.sonar.api.batch
Class AbstractSumChildrenDecorator
java.lang.Object
org.sonar.api.batch.AbstractSumChildrenDecorator
- All Implemented Interfaces:
- CheckProject, Decorator, BatchComponent, BatchExtension, Extension
public abstract class AbstractSumChildrenDecorator
- extends Object
- implements Decorator
Sum measures of child resources.
- Since:
- 1.10
AbstractSumChildrenDecorator
public AbstractSumChildrenDecorator()
generatesMetrics
public abstract List<Metric> generatesMetrics()
- 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.
- Returns:
- not null list of metrics
shouldExecuteOnProject
public boolean shouldExecuteOnProject(Project project)
-
- Specified by:
shouldExecuteOnProject
in interface CheckProject
shouldSaveZeroIfNoChildMeasures
protected abstract boolean shouldSaveZeroIfNoChildMeasures()
- Returns:
- whether it should save zero if no child measures
decorate
public void decorate(Resource resource,
DecoratorContext context)
-
- Specified by:
decorate
in interface Decorator
- Parameters:
resource
- resource that is currently decorated, equivalent of context.getResource()
shouldDecorateResource
public boolean shouldDecorateResource(Resource resource)
- Returns:
- whether the resource should be decorated or not
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2009–2015 SonarSource. All rights reserved.