public final class JavaMetrics
extends java.lang.Object
Modifier and Type | Method | Description |
---|---|---|
static double |
get(net.sourceforge.pmd.lang.metrics.MetricKey<ASTAnyTypeDeclaration> key,
ASTAnyTypeDeclaration node) |
Computes the standard value of the metric identified by its code on a class AST node.
|
static double |
get(net.sourceforge.pmd.lang.metrics.MetricKey<ASTAnyTypeDeclaration> key,
ASTAnyTypeDeclaration node,
net.sourceforge.pmd.lang.metrics.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(net.sourceforge.pmd.lang.metrics.MetricKey<MethodLikeNode> key,
ASTAnyTypeDeclaration node,
net.sourceforge.pmd.lang.metrics.MetricOptions options,
net.sourceforge.pmd.lang.metrics.ResultOption resultOption) |
Compute the sum, average, or highest value of the operation metric on all operations of the class node.
|
static double |
get(net.sourceforge.pmd.lang.metrics.MetricKey<MethodLikeNode> key,
ASTAnyTypeDeclaration node,
net.sourceforge.pmd.lang.metrics.ResultOption resultOption) |
Compute the sum, average, or highest value of the standard operation metric on all operations of the class node.
|
static double |
get(net.sourceforge.pmd.lang.metrics.MetricKey<MethodLikeNode> key,
ASTMethodOrConstructorDeclaration node) |
Deprecated.
Provided here for backwards binary compatibility with
get(MetricKey, MethodLikeNode) .
Please explicitly link your code to that method and recompile your code. Will be remove with 7.0.0 |
static double |
get(net.sourceforge.pmd.lang.metrics.MetricKey<MethodLikeNode> key,
ASTMethodOrConstructorDeclaration node,
net.sourceforge.pmd.lang.metrics.MetricOptions options) |
Deprecated.
Provided here for backwards binary compatibility with
get(MetricKey, MethodLikeNode, MetricOptions) .
Please explicitly link your code to that method and recompile your code. Will be remove with 7.0.0 |
static double |
get(net.sourceforge.pmd.lang.metrics.MetricKey<MethodLikeNode> key,
MethodLikeNode node) |
Computes the standard version of the metric identified by the key on a operation AST node.
|
static double |
get(net.sourceforge.pmd.lang.metrics.MetricKey<MethodLikeNode> key,
MethodLikeNode node,
net.sourceforge.pmd.lang.metrics.MetricOptions options) |
Computes a metric identified by its key on a operation AST node.
|
public static double get(net.sourceforge.pmd.lang.metrics.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(net.sourceforge.pmd.lang.metrics.MetricKey<ASTAnyTypeDeclaration> key, ASTAnyTypeDeclaration node, net.sourceforge.pmd.lang.metrics.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(net.sourceforge.pmd.lang.metrics.MetricKey<MethodLikeNode> key, MethodLikeNode 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(net.sourceforge.pmd.lang.metrics.MetricKey<MethodLikeNode> key, ASTMethodOrConstructorDeclaration node)
get(MetricKey, MethodLikeNode)
.
Please explicitly link your code to that method and recompile your code. Will be remove with 7.0.0get(MetricKey, MethodLikeNode)
@Deprecated public static double get(net.sourceforge.pmd.lang.metrics.MetricKey<MethodLikeNode> key, ASTMethodOrConstructorDeclaration node, net.sourceforge.pmd.lang.metrics.MetricOptions options)
get(MetricKey, MethodLikeNode, MetricOptions)
.
Please explicitly link your code to that method and recompile your code. Will be remove with 7.0.0public static double get(net.sourceforge.pmd.lang.metrics.MetricKey<MethodLikeNode> key, MethodLikeNode node, net.sourceforge.pmd.lang.metrics.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(net.sourceforge.pmd.lang.metrics.MetricKey<MethodLikeNode> key, ASTAnyTypeDeclaration node, net.sourceforge.pmd.lang.metrics.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 computedpublic static double get(net.sourceforge.pmd.lang.metrics.MetricKey<MethodLikeNode> key, ASTAnyTypeDeclaration node, net.sourceforge.pmd.lang.metrics.MetricOptions options, net.sourceforge.pmd.lang.metrics.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 computedCopyright © 2002–2018 PMD. All rights reserved.