Package 

Class AbstractMetricTestRule

  • 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.

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • 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
    • Constructor Detail

      • AbstractMetricTestRule

        AbstractMetricTestRule(Metric<out Object, N> metric)
    • Method Detail

      • apply

         void apply(Node target, RuleContext ctx)