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,net.sourceforge.pmd.lang.metrics.Metric<MethodLikeNode>
- Direct Known Subclasses:
AtfdMetric.AtfdOperationMetric,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 booleansupports(ASTMethodOrConstructorDeclaration node)Deprecated.Provided here for backwards binary compatibility withsupports(MethodLikeNode).booleansupports(MethodLikeNode node)Returns true if the metric can be computed on this operation.
-
-
-
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:
supportsin interfacenet.sourceforge.pmd.lang.metrics.Metric<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)
-
-