public final class JavaMetrics
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static double |
get(MetricKey<ASTAnyTypeDeclaration> key,
ASTAnyTypeDeclaration node)
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)
Computes a metric identified by its code on a class AST node, possibly selecting a variant with the
MetricOptions parameter. |
static double |
get(MetricKey<ASTMethodOrConstructorDeclaration> key,
ASTAnyTypeDeclaration node,
MetricOptions options,
ResultOption resultOption)
Compute the sum, average, or highest value of the operation metric on all operations of the class node.
|
static double |
get(MetricKey<ASTMethodOrConstructorDeclaration> key,
ASTAnyTypeDeclaration node,
ResultOption resultOption)
Compute the sum, average, or highest value of the standard operation metric on all operations of the class node.
|
static double |
get(MetricKey<ASTMethodOrConstructorDeclaration> key,
ASTMethodOrConstructorDeclaration node)
Computes the standard version of the metric identified by the key on a operation AST node.
|
static double |
get(MetricKey<ASTMethodOrConstructorDeclaration> key,
ASTMethodOrConstructorDeclaration node,
MetricOptions options)
Computes a metric identified by its key on a operation AST node.
|
public static double get(MetricKey<ASTAnyTypeDeclaration> key, ASTAnyTypeDeclaration node)
key
- The key identifying the metric to be computednode
- The node on which to compute the metricDouble.NaN
if the value couldn't be computedpublic static double get(MetricKey<ASTAnyTypeDeclaration> key, ASTAnyTypeDeclaration node, MetricOptions options)
MetricOptions
parameter.key
- The key identifying the metric to be computednode
- The node on which to compute the metricoptions
- The options of the metricDouble.NaN
if the value couldn't be computedpublic static double get(MetricKey<ASTMethodOrConstructorDeclaration> key, ASTMethodOrConstructorDeclaration node)
key
- The key identifying the metric to be computednode
- The node on which to compute the metricDouble.NaN
if the value couldn't be computedpublic static double get(MetricKey<ASTMethodOrConstructorDeclaration> key, ASTMethodOrConstructorDeclaration node, MetricOptions options)
key
- The key identifying the metric to be computednode
- The node on which to compute the metricoptions
- The options of the metricDouble.NaN
if the value couldn't be computedpublic static double get(MetricKey<ASTMethodOrConstructorDeclaration> key, ASTAnyTypeDeclaration node, ResultOption resultOption)
ResultOption
parameter.key
- The key identifying the metric to be computednode
- The node on which to compute the metricresultOption
- The result option to useDouble.NaN
if the value couldn't be computed or option
is
null
public static double get(MetricKey<ASTMethodOrConstructorDeclaration> key, ASTAnyTypeDeclaration node, MetricOptions options, ResultOption resultOption)
ResultOption
parameter.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 metricDouble.NaN
if the value couldn't be computed or option
is
null
Copyright © 2002–2018 PMD. All rights reserved.