Package net.sourceforge.pmd.lang.metrics
Class AbstractMetricsFacade<T extends QualifiableNode,O extends QualifiableNode>
- java.lang.Object
-
- net.sourceforge.pmd.lang.metrics.AbstractMetricsFacade<T,O>
-
- Type Parameters:
T- Type of type declaration nodes of the languageO- Type of operation declaration nodes of the language
@Deprecated public abstract class AbstractMetricsFacade<T extends QualifiableNode,O extends QualifiableNode> extends Object
Deprecated.See package descriptionBase class for a façade that can compute metrics for types, operations and compute aggregate results with a result option.- Since:
- 6.0.0
- Author:
- Clément Fournier
-
-
Constructor Summary
Constructors Constructor Description AbstractMetricsFacade()Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description doublecomputeForOperation(MetricKey<O> key, O node, MetricOptions options)Deprecated.Computes a metric identified by its key on a operation AST node.doublecomputeForType(MetricKey<T> key, T node, MetricOptions options)Deprecated.Computes a metric identified by its code on a class AST node, possibly selecting a variant with theMetricOptionsparameter.doublecomputeWithResultOption(MetricKey<O> key, T node, MetricOptions options, ResultOption resultOption)Deprecated.Compute the sum, average, or highest value of the operation metric on all operations of the class node.protected abstract MetricsComputer<T,O>getLanguageSpecificComputer()Deprecated.protected abstract ProjectMemoizer<T,O>getLanguageSpecificProjectMemoizer()Deprecated.
-
-
-
Method Detail
-
getLanguageSpecificComputer
@Deprecated protected abstract MetricsComputer<T,O> getLanguageSpecificComputer()
Deprecated.Gets the language specific metrics computer.- Returns:
- The metrics computer
-
getLanguageSpecificProjectMemoizer
@Deprecated protected abstract ProjectMemoizer<T,O> getLanguageSpecificProjectMemoizer()
Deprecated.Gets the language-specific project memoizer.- Returns:
- The project memoizer
-
computeForType
public double computeForType(MetricKey<T> key, T node, MetricOptions options)
Deprecated.Computes a metric identified by its code on a class AST node, possibly selecting a variant with theMetricOptionsparameter.- Parameters:
key- The key identifying the metric to be computednode- The node on which to compute the metricoptions- The options of the metric- Returns:
- The value of the metric, or
Double.NaNif the value couldn't be computed
-
computeForOperation
public double computeForOperation(MetricKey<O> key, O node, MetricOptions options)
Deprecated.Computes a metric identified by its key on a operation AST node.- Parameters:
key- The key identifying the metric to be computednode- The node on which to compute the metricoptions- The options of the metric- Returns:
- The value of the metric, or
Double.NaNif the value couldn't be computed
-
computeWithResultOption
public double computeWithResultOption(MetricKey<O> key, T node, MetricOptions options, ResultOption resultOption)
Deprecated.Compute the sum, average, or highest value of the operation metric on all operations of the class node. The type of operation is specified by theResultOptionparameter.- Parameters:
key- The key identifying the metric to be computednode- The node on which to compute the metricresultOption- The result option to useoptions- The options of the metric- Returns:
- The value of the metric, or
Double.NaNif the value couldn't be computed orresultOptionisnull
-
-