public final class ApexMetrics
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static double |
get(MetricKey<ASTMethod> key,
ASTMethod node)
Computes the standard version of the metric identified by the key on a operation AST node.
|
static double |
get(MetricKey<ASTMethod> key,
ASTMethod node,
MetricOptions options)
Computes a metric identified by its key on a operation AST node, possibly selecting metric options with the
options parameter. |
static double |
get(MetricKey<ASTMethod> key,
ASTUserClassOrInterface<?> 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<ASTMethod> key,
ASTUserClassOrInterface<?> 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<ASTUserClassOrInterface<?>> key,
ASTUserClass node)
Computes the standard value of the metric identified by its code on a class AST node.
|
static double |
get(MetricKey<ASTUserClassOrInterface<?>> key,
ASTUserClass node,
MetricOptions options)
Computes a metric identified by its code on a class AST node, possibly selecting metric options with the
options parameter. |
static ApexMetricsFacade |
getFacade()
Returns the underlying facade.
|
public static ApexMetricsFacade getFacade()
public static double get(MetricKey<ASTUserClassOrInterface<?>> key, ASTUserClass 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<ASTUserClassOrInterface<?>> key, ASTUserClass node, MetricOptions options)
options
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<ASTMethod> key, ASTMethod 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<ASTMethod> key, ASTMethod node, MetricOptions options)
options
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<ASTMethod> key, ASTUserClassOrInterface<?> 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<ASTMethod> key, ASTUserClassOrInterface<?> node, MetricOptions options, ResultOption resultOption)
ResultOption
parameter.key
- The key identifying the metric to be computednode
- The node on which to compute the metricoptions
- The options of the metricresultOption
- The result option to useDouble.NaN
if the value couldn't be computed or option
is
null
Copyright © 2002–2018 PMD. All rights reserved.