-
- All Implemented Interfaces:
-
net.sourceforge.pmd.Rule
,net.sourceforge.pmd.properties.PropertySource
public abstract class AbstractMetricTestRule<N extends Number, Comparable<N>> extends AbstractRule
Abstract test rule for a metric. Tests of metrics use the standard framework for rule testing, using one dummy rule per metric. Default parameters can be overridden by overriding the protected methods of this class.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract class
AbstractMetricTestRule.OfInt
public abstract class
AbstractMetricTestRule.OfDouble
-
Field Summary
Fields Modifier and Type Field Description public Language
language
public LanguageVersion
minimumLanguageVersion
public LanguageVersion
maximumLanguageVersion
public String
name
public String
since
public String
ruleClass
public String
ruleSetName
public String
message
public String
description
public List<String>
examples
public String
externalInfoUrl
public RulePriority
priority
public final static StringProperty
VIOLATION_SUPPRESS_REGEX_DESCRIPTOR
public final static StringProperty
VIOLATION_SUPPRESS_XPATH_DESCRIPTOR
-
Constructor Summary
Constructors Constructor Description AbstractMetricTestRule(Metric<out Object, N> metric)
-
Method Summary
Modifier and Type Method Description void
apply(Node target, RuleContext ctx)
-
Methods inherited from class net.sourceforge.pmd.lang.rule.AbstractRule
addExample, addViolation, addViolationWithMessage, deepCopy, deepCopyValuesTo, end, equals, getDescription, getExamples, getExternalInfoUrl, getLanguage, getMaximumLanguageVersion, getMessage, getMinimumLanguageVersion, getName, getPriority, getRuleClass, getRuleSetName, getSince, getTargetSelector, hashCode, isDeprecated, setDeprecated, setDescription, setExternalInfoUrl, setLanguage, setMaximumLanguageVersion, setMessage, setMinimumLanguageVersion, setName, setPriority, setRuleClass, setRuleSetName, setSince, start
-
Methods inherited from class net.sourceforge.pmd.properties.AbstractPropertySource
definePropertyDescriptor, dysfunctionReason, getOverriddenPropertiesByPropertyDescriptor, getOverriddenPropertyDescriptors, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, isPropertyOverridden, setProperty
-
Methods inherited from class net.sourceforge.pmd.Rule
initialize
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-