public abstract class AbstractJavaClassMetric extends AbstractJavaMetric<ASTAnyTypeDeclaration> implements JavaClassMetric
Constructor and Description |
---|
AbstractJavaClassMetric() |
Modifier and Type | Method and Description |
---|---|
protected int |
countMatchingFieldSigs(ASTAnyTypeDeclaration classNode,
JavaFieldSigMask mask)
Counts the fields matching the signature mask in this class.
|
protected int |
countMatchingOpSigs(ASTAnyTypeDeclaration classNode,
JavaOperationSigMask mask)
Counts the operations matching the signature mask in this class.
|
protected java.util.List<ASTFieldDeclaration> |
getFields(ASTAnyTypeDeclaration node)
Gets a list of all fields declared in the class.
|
protected java.util.List<ASTMethodOrConstructorDeclaration> |
getMethodsAndConstructors(ASTAnyTypeDeclaration node)
Gets a list of all methods and constructors declared in the class.
|
boolean |
supports(ASTAnyTypeDeclaration node)
Returns true if the metric can be computed on this type declaration.
|
equals, hashCode
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
computeFor
public boolean supports(ASTAnyTypeDeclaration node)
supports
in interface Metric<ASTAnyTypeDeclaration>
node
- The type declarationprotected int countMatchingOpSigs(ASTAnyTypeDeclaration classNode, JavaOperationSigMask mask)
classNode
- The class on which to countmask
- The maskprotected int countMatchingFieldSigs(ASTAnyTypeDeclaration classNode, JavaFieldSigMask mask)
classNode
- The class on which to countmask
- The maskprotected java.util.List<ASTMethodOrConstructorDeclaration> getMethodsAndConstructors(ASTAnyTypeDeclaration node)
node
- The classprotected java.util.List<ASTFieldDeclaration> getFields(ASTAnyTypeDeclaration node)
node
- The classCopyright © 2002–2017 PMD. All rights reserved.