T
- Type of type declaration nodes of the languageO
- Type of operation declaration nodes of the languageAbstractMetricsComputer
public interface MetricsComputer<T extends QualifiableNode,O extends QualifiableNode>
Modifier and Type | Method | Description |
---|---|---|
double |
computeForOperation(MetricKey<O> key,
O node,
boolean force,
MetricOptions options,
MetricMemoizer<O> memoizer) |
Computes the value of a metric for an operation and stores the result in the OperationStats object.
|
double |
computeForType(MetricKey<T> key,
T node,
boolean force,
MetricOptions options,
MetricMemoizer<T> memoizer) |
Computes the value of a metric for a class and stores the result in the ClassStats object.
|
double |
computeWithResultOption(MetricKey<O> key,
T node,
boolean force,
MetricOptions options,
ResultOption option,
ProjectMemoizer<T,O> stats) |
Computes an aggregate result using a ResultOption.
|
double computeForType(MetricKey<T> key, T node, boolean force, MetricOptions options, MetricMemoizer<T> memoizer)
key
- The class metric to computenode
- The AST node of the classforce
- Force the recomputation; if unset, we'll first check for a memoized resultoptions
- The options of the metric to computememoizer
- The object memoizing the resultsDouble.NaN
if it couldn't be performeddouble computeForOperation(MetricKey<O> key, O node, boolean force, MetricOptions options, MetricMemoizer<O> memoizer)
key
- The operation metric to computenode
- The AST node of the operationforce
- Force the recomputation; if unset, we'll first check for a memoized resultoptions
- The options of the metric to computememoizer
- The object memoizing the resultsDouble.NaN
if it couldn't be performeddouble computeWithResultOption(MetricKey<O> key, T node, boolean force, MetricOptions options, ResultOption option, ProjectMemoizer<T,O> stats)
key
- The class metric to computenode
- The AST node of the classforce
- Force the recomputation; if unset, we'll first check for a memoized resultoptions
- The options of the metricoption
- The type of result to computestats
- The ClassStats storing info about the classDouble.NaN
if it couldn't be performedCopyright © 2002–2018 PMD. All rights reserved.