Class AbstractNcssCountRule
- java.lang.Object
-
- net.sourceforge.pmd.properties.AbstractPropertySource
-
- net.sourceforge.pmd.lang.rule.AbstractRule
-
- net.sourceforge.pmd.lang.java.rule.AbstractJavaRule
-
- net.sourceforge.pmd.lang.java.rule.AbstractStatisticalJavaRule
-
- net.sourceforge.pmd.lang.java.rule.design.AbstractNcssCountRule
-
- All Implemented Interfaces:
JavaParserVisitor
,ImmutableLanguage
,StatisticalRule
,PropertySource
,Rule
- Direct Known Subclasses:
NcssConstructorCountRule
,NcssMethodCountRule
,NcssTypeCountRule
@Deprecated @InternalApi public abstract class AbstractNcssCountRule extends AbstractStatisticalJavaRule
Deprecated.Internal APIAbstract superclass for NCSS counting methods. Counts tokens according to JavaNCSS rules.- Author:
- Jason Bennett
-
-
Field Summary
-
Fields inherited from class net.sourceforge.pmd.properties.AbstractPropertySource
propertyDescriptors, propertyValuesByDescriptor
-
Fields inherited from interface net.sourceforge.pmd.Rule
VIOLATION_SUPPRESS_REGEX_DESCRIPTOR, VIOLATION_SUPPRESS_XPATH_DESCRIPTOR
-
Fields inherited from interface net.sourceforge.pmd.lang.rule.stat.StatisticalRule
MINIMUM_DESCRIPTOR, SIGMA_DESCRIPTOR, TOP_SCORE_DESCRIPTOR
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractNcssCountRule(Class<?> nodeClass)
Deprecated.Count the nodes of the given type using NCSS rules.
-
Method Summary
-
Methods inherited from class net.sourceforge.pmd.lang.java.rule.AbstractStatisticalJavaRule
addDataPoint, apply, getViolationParameters
-
Methods inherited from class net.sourceforge.pmd.lang.java.rule.AbstractJavaRule
getDeclaringType, importsPackage, isQualifiedName, isSuppressed, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visitAll
-
Methods inherited from class net.sourceforge.pmd.lang.rule.AbstractRule
addExample, addRuleChainVisit, addRuleChainVisit, addViolation, addViolation, addViolation, addViolationWithMessage, addViolationWithMessage, addViolationWithMessage, deepCopy, deepCopyValuesTo, end, equals, getDescription, getExamples, getExternalInfoUrl, getLanguage, getMaximumLanguageVersion, getMessage, getMinimumLanguageVersion, getName, getParserOptions, getPriority, getPropertySourceType, getRuleChainVisits, getRuleClass, getRuleSetName, getSince, hashCode, isDeprecated, isDfa, isMultifile, isRuleChain, isTypeResolution, setDeprecated, setDescription, setDfa, setExternalInfoUrl, setLanguage, setMaximumLanguageVersion, setMessage, setMinimumLanguageVersion, setMultifile, setName, setPriority, setRuleClass, setRuleSetName, setSince, setTypeResolution, setUsesDFA, setUsesMultifile, setUsesTypeResolution, start, usesDFA, usesMultifile, usesRuleChain, usesTypeResolution
-
Methods inherited from class net.sourceforge.pmd.properties.AbstractPropertySource
copyPropertyDescriptors, copyPropertyValues, definePropertyDescriptor, dysfunctionReason, getOverriddenPropertiesByPropertyDescriptor, getOverriddenPropertyDescriptors, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, ignoredProperties, isPropertyOverridden, setProperty, setProperty, useDefaultValueFor, usesDefaultValues
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sourceforge.pmd.properties.PropertySource
definePropertyDescriptor, dysfunctionReason, getOverriddenPropertiesByPropertyDescriptor, getOverriddenPropertyDescriptors, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, ignoredProperties, isPropertyOverridden, setProperty, setProperty, useDefaultValueFor, usesDefaultValues
-
Methods inherited from interface net.sourceforge.pmd.Rule
addExample, addRuleChainVisit, addRuleChainVisit, deepCopy, end, getDescription, getExamples, getExternalInfoUrl, getLanguage, getMaximumLanguageVersion, getMessage, getMinimumLanguageVersion, getName, getParserOptions, getPriority, getRuleChainVisits, getRuleClass, getRuleSetName, getSince, isDeprecated, isDfa, isMultifile, isRuleChain, isTypeResolution, setDeprecated, setDescription, setDfa, setExternalInfoUrl, setLanguage, setMaximumLanguageVersion, setMessage, setMinimumLanguageVersion, setMultifile, setName, setPriority, setRuleClass, setRuleSetName, setSince, setTypeResolution, setUsesDFA, setUsesMultifile, setUsesTypeResolution, start, usesDFA, usesMultifile, usesRuleChain, usesTypeResolution
-
-
-
-
Constructor Detail
-
AbstractNcssCountRule
protected AbstractNcssCountRule(Class<?> nodeClass)
Deprecated.Count the nodes of the given type using NCSS rules.- Parameters:
nodeClass
- class of node to count
-
-
Method Detail
-
visit
public Object visit(JavaNode node, Object data)
Deprecated.- Specified by:
visit
in interfaceJavaParserVisitor
- Overrides:
visit
in classAbstractJavaRule
-
countNodeChildren
protected Integer countNodeChildren(Node node, Object data)
Deprecated.Count the number of children of the given Java node. Adds one to count the node itself.- Parameters:
node
- java node having children counteddata
- node data- Returns:
- count of the number of children of the node, plus one
-
visit
public Object visit(ASTForStatement node, Object data)
Deprecated.- Specified by:
visit
in interfaceJavaParserVisitor
- Overrides:
visit
in classAbstractJavaRule
-
visit
public Object visit(ASTDoStatement node, Object data)
Deprecated.- Specified by:
visit
in interfaceJavaParserVisitor
- Overrides:
visit
in classAbstractJavaRule
-
visit
public Object visit(ASTIfStatement node, Object data)
Deprecated.- Specified by:
visit
in interfaceJavaParserVisitor
- Overrides:
visit
in classAbstractJavaRule
-
visit
public Object visit(ASTWhileStatement node, Object data)
Deprecated.- Specified by:
visit
in interfaceJavaParserVisitor
- Overrides:
visit
in classAbstractJavaRule
-
visit
public Object visit(ASTBreakStatement node, Object data)
Deprecated.- Specified by:
visit
in interfaceJavaParserVisitor
- Overrides:
visit
in classAbstractJavaRule
-
visit
public Object visit(ASTCatchStatement node, Object data)
Deprecated.- Specified by:
visit
in interfaceJavaParserVisitor
- Overrides:
visit
in classAbstractJavaRule
-
visit
public Object visit(ASTContinueStatement node, Object data)
Deprecated.- Specified by:
visit
in interfaceJavaParserVisitor
- Overrides:
visit
in classAbstractJavaRule
-
visit
public Object visit(ASTFinallyStatement node, Object data)
Deprecated.- Specified by:
visit
in interfaceJavaParserVisitor
- Overrides:
visit
in classAbstractJavaRule
-
visit
public Object visit(ASTReturnStatement node, Object data)
Deprecated.- Specified by:
visit
in interfaceJavaParserVisitor
- Overrides:
visit
in classAbstractJavaRule
-
visit
public Object visit(ASTSwitchStatement node, Object data)
Deprecated.- Specified by:
visit
in interfaceJavaParserVisitor
- Overrides:
visit
in classAbstractJavaRule
-
visit
public Object visit(ASTSynchronizedStatement node, Object data)
Deprecated.- Specified by:
visit
in interfaceJavaParserVisitor
- Overrides:
visit
in classAbstractJavaRule
-
visit
public Object visit(ASTThrowStatement node, Object data)
Deprecated.- Specified by:
visit
in interfaceJavaParserVisitor
- Overrides:
visit
in classAbstractJavaRule
-
visit
public Object visit(ASTStatementExpression node, Object data)
Deprecated.- Specified by:
visit
in interfaceJavaParserVisitor
- Overrides:
visit
in classAbstractJavaRule
-
visit
public Object visit(ASTLabeledStatement node, Object data)
Deprecated.- Specified by:
visit
in interfaceJavaParserVisitor
- Overrides:
visit
in classAbstractJavaRule
-
visit
public Object visit(ASTLocalVariableDeclaration node, Object data)
Deprecated.- Specified by:
visit
in interfaceJavaParserVisitor
- Overrides:
visit
in classAbstractJavaRule
-
visit
public Object visit(ASTSwitchLabel node, Object data)
Deprecated.- Specified by:
visit
in interfaceJavaParserVisitor
- Overrides:
visit
in classAbstractJavaRule
-
-