net.sourceforge.pmd.lang.rule
Class MockRule
java.lang.Object
net.sourceforge.pmd.AbstractPropertySource
net.sourceforge.pmd.lang.rule.AbstractRule
net.sourceforge.pmd.lang.rule.MockRule
- All Implemented Interfaces:
- PropertySource, Rule
public class MockRule
- extends AbstractRule
This is a Rule implementation which can be used in scenarios where an actual
functional Rule is not needed. For example, during unit testing, or as
an editable surrogate used by IDE plugins. The Language of this Rule
defaults to Java.
Method Summary |
void |
apply(List<? extends Node> nodes,
RuleContext ctx)
Apply this rule to the given collection of nodes, using the given
context. |
Methods inherited from class net.sourceforge.pmd.lang.rule.AbstractRule |
addExample, addRuleChainVisit, addRuleChainVisit, addViolation, addViolation, addViolation, addViolationWithMessage, addViolationWithMessage, addViolationWithMessage, deepCopyValuesTo, end, equals, getDescription, getExamples, getExternalInfoUrl, getLanguage, getMaximumLanguageVersion, getMessage, getMinimumLanguageVersion, getName, getParserOptions, getPriority, getRuleChainVisits, getRuleClass, getRuleSetName, getSince, hashCode, isDeprecated, setDeprecated, setDescription, setExternalInfoUrl, setLanguage, setMaximumLanguageVersion, setMessage, setMinimumLanguageVersion, setName, setPriority, setRuleClass, setRuleSetName, setSince, setUsesDFA, setUsesTypeResolution, start, usesDFA, usesRuleChain, usesTypeResolution |
Methods inherited from class net.sourceforge.pmd.AbstractPropertySource |
copyPropertyDescriptors, copyPropertyValues, definePropertyDescriptor, dysfunctionReason, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, ignoredProperties, setProperty, useDefaultValueFor, usesDefaultValues |
Methods inherited from interface net.sourceforge.pmd.PropertySource |
definePropertyDescriptor, dysfunctionReason, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, ignoredProperties, setProperty, useDefaultValueFor, usesDefaultValues |
MockRule
public MockRule()
MockRule
public MockRule(String name,
String description,
String message,
String ruleSetName,
RulePriority priority)
MockRule
public MockRule(String name,
String description,
String message,
String ruleSetName)
apply
public void apply(List<? extends Node> nodes,
RuleContext ctx)
- Description copied from interface:
Rule
- Apply this rule to the given collection of nodes, using the given
context.
- Parameters:
nodes
- the nodesctx
- the rule context
Copyright © 2002-2015 InfoEther. All Rights Reserved.