public final class Metrics extends Object
Modifier and Type | Method and Description |
---|---|
static double |
get(ClassMetricKey key,
ASTClassOrInterfaceDeclaration node)
Computes the standard value of the metric identified by its code on a class AST node.
|
static double |
get(ClassMetricKey key,
ASTClassOrInterfaceDeclaration node,
MetricVersion version)
Computes a metric identified by its code on a class AST node, possibly selecting a variant with the
MetricVersion parameter. |
static double |
get(OperationMetricKey key,
ASTClassOrInterfaceDeclaration node,
MetricVersion version,
ResultOption option)
Compute the sum, average, or highest value of the operation metric on all operations of the class node.
|
static double |
get(OperationMetricKey key,
ASTMethodOrConstructorDeclaration node)
Computes the standard version of the metric identified by the key on a operation AST node.
|
static double |
get(OperationMetricKey key,
ASTMethodOrConstructorDeclaration node,
MetricVersion version)
Computes a metric identified by its key on a operation AST node.
|
public static double get(ClassMetricKey key, ASTClassOrInterfaceDeclaration node)
key
- The key identifying the metric to be computednode
- The node on which to compute the metricDouble.NaN
if the value couln't be computed.public static double get(ClassMetricKey key, ASTClassOrInterfaceDeclaration node, MetricVersion version)
MetricVersion
parameter.key
- The key identifying the metric to be computednode
- The node on which to compute the metricversion
- The version of the metric.Double.NaN
if the value couln't be computed.public static double get(OperationMetricKey key, ASTMethodOrConstructorDeclaration node)
key
- The key identifying the metric to be computednode
- The node on which to compute the metricDouble.NaN
if the value couln't be computed.public static double get(OperationMetricKey key, ASTMethodOrConstructorDeclaration node, MetricVersion version)
key
- The key identifying the metric to be computednode
- The node on which to compute the metricversion
- The version of the metric.Double.NaN
if the value couln't be computed.public static double get(OperationMetricKey key, ASTClassOrInterfaceDeclaration node, MetricVersion version, ResultOption option)
ResultOption
parameter.key
- The key identifying the metric to be computednode
- The node on which to compute the metricversion
- The version of the metric.option
- The result option to use.Double.NaN
if the value couln't be computed or option
is
null.Copyright © 2002–2017 PMD. All rights reserved.