Enum JavaOperationMetricKey
- java.lang.Object
-
- java.lang.Enum<JavaOperationMetricKey>
-
- net.sourceforge.pmd.lang.java.metrics.api.JavaOperationMetricKey
-
- All Implemented Interfaces:
Serializable
,Comparable<JavaOperationMetricKey>
,MetricKey<MethodLikeNode>
,DataMap.DataKey<MetricKey<MethodLikeNode>,Double>
public enum JavaOperationMetricKey extends Enum<JavaOperationMetricKey> implements MetricKey<MethodLikeNode>
Keys identifying standard operation metrics.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ATFD
Access to Foreign Data.CLASS_FAN_OUT
ClassFanOut ComplexityCOGNITIVE_COMPLEXITY
Cognitive complexity.CYCLO
Cyclomatic complexity.LOC
Lines of Code.NCSS
Non Commenting Source Statements.NPATH
N-path complexity.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description JavaOperationMetric
getCalculator()
boolean
supports(ASTMethodOrConstructorDeclaration node)
Deprecated.Provided here for backwards binary compatibility withsupports(MethodLikeNode)
.boolean
supports(MethodLikeNode node)
static JavaOperationMetricKey
valueOf(String name)
Returns the enum constant of this type with the specified name.static JavaOperationMetricKey[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
COGNITIVE_COMPLEXITY
public static final JavaOperationMetricKey COGNITIVE_COMPLEXITY
Cognitive complexity.- See Also:
CognitiveComplexityMetric
-
ATFD
public static final JavaOperationMetricKey ATFD
Access to Foreign Data.- See Also:
AtfdMetric
-
CYCLO
public static final JavaOperationMetricKey CYCLO
Cyclomatic complexity.- See Also:
CycloMetric
-
NCSS
public static final JavaOperationMetricKey NCSS
Non Commenting Source Statements.- See Also:
NcssMetric
-
LOC
public static final JavaOperationMetricKey LOC
Lines of Code.- See Also:
LocMetric
-
NPATH
public static final JavaOperationMetricKey NPATH
N-path complexity.- See Also:
NpathMetric
-
CLASS_FAN_OUT
public static final JavaOperationMetricKey CLASS_FAN_OUT
ClassFanOut Complexity
-
-
Method Detail
-
values
public static JavaOperationMetricKey[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (JavaOperationMetricKey c : JavaOperationMetricKey.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JavaOperationMetricKey valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getCalculator
public JavaOperationMetric getCalculator()
- Specified by:
getCalculator
in interfaceMetricKey<MethodLikeNode>
-
supports
public boolean supports(MethodLikeNode node)
- Specified by:
supports
in interfaceMetricKey<MethodLikeNode>
-
supports
@Deprecated public boolean supports(ASTMethodOrConstructorDeclaration node)
Deprecated.Provided here for backwards binary compatibility withsupports(MethodLikeNode)
. Please explicitly link your code to that method and recompile your code. Will be remove with 7.0.0- See Also:
supports(MethodLikeNode)
-
-