Package net.sourceforge.pmd.lang.metrics
Interface MetricsComputer<T extends QualifiableNode,O extends QualifiableNode>
-
- Type Parameters:
T
- Type of type declaration nodes of the languageO
- Type of operation declaration nodes of the language
- All Known Implementing Classes:
AbstractMetricsComputer
@Deprecated public interface MetricsComputer<T extends QualifiableNode,O extends QualifiableNode>
Deprecated.See package descriptionBasic interface for metrics computers that can compute metrics for types, operations and compute aggregate results with a result option. Computers should typically be separated from the storage units (ProjectMemoizer) to split responsibilities.- Since:
- 6.0.0
- Author:
- Clément Fournier
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description double
computeForOperation(MetricKey<O> key, O node, boolean force, MetricOptions options, MetricMemoizer<O> memoizer)
Deprecated.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)
Deprecated.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)
Deprecated.Computes an aggregate result using a ResultOption.
-
-
-
Method Detail
-
computeForType
double computeForType(MetricKey<T> key, T node, boolean force, MetricOptions options, MetricMemoizer<T> memoizer)
Deprecated.Computes the value of a metric for a class and stores the result in the ClassStats object.- Parameters:
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 results- Returns:
- The result of the computation, or
Double.NaN
if it couldn't be performed
-
computeForOperation
double computeForOperation(MetricKey<O> key, O node, boolean force, MetricOptions options, MetricMemoizer<O> memoizer)
Deprecated.Computes the value of a metric for an operation and stores the result in the OperationStats object.- Parameters:
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 results- Returns:
- The result of the computation, or
Double.NaN
if it couldn't be performed
-
computeWithResultOption
double computeWithResultOption(MetricKey<O> key, T node, boolean force, MetricOptions options, ResultOption option, ProjectMemoizer<T,O> stats)
Deprecated.Computes an aggregate result using a ResultOption.- Parameters:
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 class- Returns:
- The result of the computation, or
Double.NaN
if it couldn't be performed
-
-