Package net.sourceforge.pmd.lang.test
Class AbstractMetricTestRule
-
- All Implemented Interfaces:
-
net.sourceforge.pmd.lang.rule.Rule,net.sourceforge.pmd.properties.PropertySource
public abstract class AbstractMetricTestRule<N extends Number, Comparable<N>> extends AbstractRuleAbstract 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.
Clément Fournier
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classAbstractMetricTestRule.OfIntpublic abstract classAbstractMetricTestRule.OfDouble
-
Field Summary
Fields Modifier and Type Field Description public Languagelanguagepublic LanguageVersionminimumLanguageVersionpublic LanguageVersionmaximumLanguageVersionpublic Stringnamepublic Stringsincepublic StringruleClasspublic StringruleSetNamepublic Stringmessagepublic Stringdescriptionpublic List<String>examplespublic StringexternalInfoUrlpublic RulePriorityprioritypublic final List<PropertyDescriptor<out Object>>propertyDescriptorspublic final static PropertyDescriptor<Optional<Pattern>>VIOLATION_SUPPRESS_REGEX_DESCRIPTORpublic final static PropertyDescriptor<Optional<String>>VIOLATION_SUPPRESS_XPATH_DESCRIPTOR
-
Constructor Summary
Constructors Constructor Description AbstractMetricTestRule(Metric<out Object, N> metric)
-
Method Summary
Modifier and Type Method Description voidapply(Node target, RuleContext ctx)-
Methods inherited from class net.sourceforge.pmd.lang.rule.AbstractRule
addExample, deepCopy, dysfunctionReason, 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, getOverriddenPropertiesByPropertyDescriptor, getOverriddenPropertyDescriptors, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, isPropertyOverridden, setProperty -
Methods inherited from class net.sourceforge.pmd.lang.rule.Rule
initialize -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-