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<ASTMethodOrConstructorDeclaration> 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<ASTMethodOrConstructorDeclaration> 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<ASTMethodOrConstructorDeclaration> key,
ASTMethodOrConstructorDeclaration 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<ASTMethodOrConstructorDeclaration> key,
ASTMethodOrConstructorDeclaration 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<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(net.sourceforge.pmd.lang.metrics.MetricKey<ASTMethodOrConstructorDeclaration> key, ASTMethodOrConstructorDeclaration 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<ASTMethodOrConstructorDeclaration> 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 computed or option
is
null
public static double get(net.sourceforge.pmd.lang.metrics.MetricKey<ASTMethodOrConstructorDeclaration> 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 computed or option
is
null
Copyright © 2002–2018 PMD. All rights reserved.