org.sonar.api.batch
Class FormulaDecorator
java.lang.Object
org.sonar.api.batch.FormulaDecorator
- All Implemented Interfaces:
- CheckProject, Decorator, BatchComponent, BatchExtension, Extension
public class FormulaDecorator
- extends Object
- implements Decorator
A pre-implementation of a decorator using a simple calculation formula
- Since:
- 1.11
FormulaDecorator
public FormulaDecorator(Metric metric)
- Creates a FormulaDecorator
- Parameters:
metric
- the metric should have an associated formula
- Throws:
IllegalArgumentException
- if no formula is associated to the metric
shouldExecuteOnProject
public boolean shouldExecuteOnProject(Project project)
-
- Specified by:
shouldExecuteOnProject
in interface CheckProject
generatesMetric
public Metric generatesMetric()
- Returns:
- metric generated by the decorator
dependsUponMetrics
public List<Metric> dependsUponMetrics()
- Returns:
- metric the decorator depends upon
decorate
public void decorate(Resource resource,
DecoratorContext context)
-
- Specified by:
decorate
in interface Decorator
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2009-2010 SonarSource. All Rights Reserved.