Class AbstractJavaOperationMetric
- java.lang.Object
-
- net.sourceforge.pmd.lang.metrics.AbstractMetric<N>
-
- net.sourceforge.pmd.lang.java.metrics.AbstractJavaMetric<MethodLikeNode>
-
- net.sourceforge.pmd.lang.java.metrics.impl.AbstractJavaOperationMetric
-
- All Implemented Interfaces:
JavaOperationMetric
,Metric<MethodLikeNode>
- Direct Known Subclasses:
AtfdMetric.AtfdOperationMetric
,ClassFanOutMetric.ClassFanOutOperationMetric
,CycloMetric
,LocMetric.LocOperationMetric
,NcssMetric.NcssOperationMetric
,NpathMetric
public abstract class AbstractJavaOperationMetric extends AbstractJavaMetric<MethodLikeNode> implements JavaOperationMetric
Base class for operation metrics. Can be applied on method and constructor declarations, and lambda expressions.- Author:
- Clément Fournier
-
-
Constructor Summary
Constructors Constructor Description AbstractJavaOperationMetric()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
supports(ASTMethodOrConstructorDeclaration node)
Deprecated.Provided here for backwards binary compatibility withsupports(MethodLikeNode)
.boolean
supports(MethodLikeNode node)
Returns true if the metric can be computed on this operation.-
Methods inherited from class net.sourceforge.pmd.lang.metrics.AbstractMetric
equals, hashCode
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sourceforge.pmd.lang.metrics.Metric
computeFor
-
-
-
-
Method Detail
-
supports
public boolean supports(MethodLikeNode node)
Returns true if the metric can be computed on this operation. By default, abstract operations are filtered out.- Specified by:
supports
in interfaceMetric<MethodLikeNode>
- Parameters:
node
- The operation- Returns:
- True if the metric can be computed on this operation
-
supports
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)
-
-