Class JavaMetrics
- java.lang.Object
-
- net.sourceforge.pmd.lang.java.metrics.JavaMetrics
-
@Deprecated public final class JavaMetrics extends Object
Deprecated.UseMetricsUtil
User bound façade of the Metrics Framework. Provides a uniform interface for the calculation of metrics.- Author:
- Clément Fournier
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static List<MethodLikeNode>
findOps(ASTAnyTypeDeclaration node)
Deprecated.static double
get(MetricKey<ASTAnyTypeDeclaration> key, ASTAnyTypeDeclaration node)
Deprecated.Computes the standard value of the metric identified by its code on a class AST node.static double
get(MetricKey<ASTAnyTypeDeclaration> key, ASTAnyTypeDeclaration node, MetricOptions options)
Deprecated.Computes a metric identified by its code on a class AST node, possibly selecting a variant with theMetricOptions
parameter.static double
get(MetricKey<MethodLikeNode> key, ASTAnyTypeDeclaration node, MetricOptions options, ResultOption resultOption)
Deprecated.Compute the sum, average, or highest value of the operation metric on all operations of the class node.static double
get(MetricKey<MethodLikeNode> key, ASTAnyTypeDeclaration node, ResultOption resultOption)
Deprecated.Compute the sum, average, or highest value of the standard operation metric on all operations of the class node.static double
get(MetricKey<MethodLikeNode> key, ASTMethodOrConstructorDeclaration node)
Deprecated.Provided here for backwards binary compatibility withget(MetricKey, MethodLikeNode)
.static double
get(MetricKey<MethodLikeNode> key, ASTMethodOrConstructorDeclaration node, MetricOptions options)
Deprecated.Provided here for backwards binary compatibility withget(MetricKey, MethodLikeNode, MetricOptions)
.static double
get(MetricKey<MethodLikeNode> key, MethodLikeNode node)
Deprecated.Computes the standard version of the metric identified by the key on a operation AST node.static double
get(MetricKey<MethodLikeNode> key, MethodLikeNode node, MetricOptions options)
Deprecated.Computes a metric identified by its key on a operation AST node.
-
-
-
Method Detail
-
get
public static double get(MetricKey<ASTAnyTypeDeclaration> key, ASTAnyTypeDeclaration node)
Deprecated.Computes the standard value of the metric identified by its code on a class AST node.- Parameters:
key
- The key identifying the metric to be computednode
- The node on which to compute the metric- Returns:
- The value of the metric, or
Double.NaN
if the value couldn't be computed
-
get
public static double get(MetricKey<ASTAnyTypeDeclaration> key, ASTAnyTypeDeclaration node, MetricOptions options)
Deprecated.Computes a metric identified by its code on a class AST node, possibly selecting a variant with theMetricOptions
parameter.- 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.NaN
if the value couldn't be computed
-
get
public static double get(MetricKey<MethodLikeNode> key, MethodLikeNode node)
Deprecated.Computes the standard version of the metric identified by the key on a operation AST node.- Parameters:
key
- The key identifying the metric to be computednode
- The node on which to compute the metric- Returns:
- The value of the metric, or
Double.NaN
if the value couldn't be computed
-
get
public static double get(MetricKey<MethodLikeNode> key, ASTMethodOrConstructorDeclaration node)
Deprecated.Provided here for backwards binary compatibility withget(MetricKey, MethodLikeNode)
. Please explicitly link your code to that method and recompile your code. Will be remove with 7.0.0- See Also:
get(MetricKey, MethodLikeNode)
-
get
@Deprecated public static double get(MetricKey<MethodLikeNode> key, ASTMethodOrConstructorDeclaration node, MetricOptions options)
Deprecated.Provided here for backwards binary compatibility withget(MetricKey, MethodLikeNode, MetricOptions)
. Please explicitly link your code to that method and recompile your code. Will be remove with 7.0.0
-
get
public static double get(MetricKey<MethodLikeNode> key, MethodLikeNode 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.NaN
if the value couldn't be computed
-
get
public static double get(MetricKey<MethodLikeNode> key, ASTAnyTypeDeclaration node, ResultOption resultOption)
Deprecated.Compute the sum, average, or highest value of the standard operation metric on all operations of the class node. The type of operation is specified by theResultOption
parameter.- Parameters:
key
- The key identifying the metric to be computednode
- The node on which to compute the metricresultOption
- The result option to use- Returns:
- The value of the metric, or
Double.NaN
if the value couldn't be computed
-
get
public static double get(MetricKey<MethodLikeNode> key, ASTAnyTypeDeclaration 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 theResultOption
parameter.- Parameters:
key
- The key identifying the metric to be computednode
- The node on which to compute the metricresultOption
- The result option to useoptions
- The version of the metric- Returns:
- The value of the metric, or
Double.NaN
if the value couldn't be computed
-
findOps
public static List<MethodLikeNode> findOps(ASTAnyTypeDeclaration node)
Deprecated.
-
-