Uses of Interface
net.sourceforge.pmd.Rule
-
Packages that use Rule Package Description net.sourceforge.pmd This is the PMD programming mistake detector.net.sourceforge.pmd.cache The violation caching system.net.sourceforge.pmd.lang.rule net.sourceforge.pmd.rules net.sourceforge.pmd.util -
-
Uses of Rule in net.sourceforge.pmd
Methods in net.sourceforge.pmd that return Rule Modifier and Type Method Description Rule
Rule. deepCopy()
Creates a new copy of this rule.Rule
RuleContext. getRule()
Deprecated.Used inAbstractRule.asCtx(Object)
, when that is gone, will be removed.Rule
RuleViolation. getRule()
Get the Rule which identified this violation.Rule
RuleSet. getRuleByName(String ruleName)
Returns the first Rule found with the given name (case-sensitive).Rule
RuleSets. getRuleByName(String ruleName)
Deprecated.Returns the first Rule found with the given name.Rule
Report.ConfigurationError. rule()
Gets the wrongly configured ruleMethods in net.sourceforge.pmd that return types with arguments of type Rule Modifier and Type Method Description Set<Rule>
RuleSets. getAllRules()
Deprecated.Return all rules from all rulesets.Collection<Rule>
RuleSet. getRules()
Returns the actual Collection of rules in this rulesetMethods in net.sourceforge.pmd with parameters of type Rule Modifier and Type Method Description static boolean
RuleSet. applies(Rule rule, LanguageVersion languageVersion)
Deprecated.This is internal API, removed in PMD 7.static RuleContext
RuleContext. create(FileAnalysisListener listener, Rule rule)
Create a new RuleContext.static RuleSet
RuleSet. forSingleRule(Rule rule)
Creates a new ruleset containing a single rule.Method parameters in net.sourceforge.pmd with type arguments of type Rule Modifier and Type Method Description static RuleSet
RuleSet. create(String name, String description, String fileName, Collection<Pattern> excludePatterns, Collection<Pattern> includePatterns, Iterable<? extends Rule> rules)
Creates a new ruleset with the given metadata such as name, description, fileName, exclude/include patterns are used.void
RuleSet. removeDysfunctionalRules(Collection<Rule> collector)
Deprecated.This is internal API, removed in PMD 7.void
RuleSets. removeDysfunctionalRules(Collection<Rule> collector)
Deprecated.Remove and collect any rules that report problems.Constructors in net.sourceforge.pmd with parameters of type Rule Constructor Description ConfigurationError(Rule theRule, String theIssue)
Creates a new configuration error for a specific rule. -
Uses of Rule in net.sourceforge.pmd.cache
Methods in net.sourceforge.pmd.cache that return Rule Modifier and Type Method Description Rule
CachedRuleViolation. getRule()
Deprecated.Rule
CachedRuleMapper. getRuleForClass(String className, String ruleName, String languageName)
Deprecated.Finds a rule instance for the given rule class name, name and target language -
Uses of Rule in net.sourceforge.pmd.lang.rule
Classes in net.sourceforge.pmd.lang.rule that implement Rule Modifier and Type Class Description class
AbstractDelegateRule
Deprecated.This is only relevant toRuleReference
, but prevents sharing the implementation ofAbstractPropertySource
.class
AbstractRule
Basic abstract implementation of all parser-independent methods of the Rule interface.class
AbstractVisitorRule
class
RuleReference
This class represents a Rule which is a reference to Rule defined in another RuleSet.class
XPathRule
Rule that tries to match an XPath expression against a DOM view of an AST.Fields in net.sourceforge.pmd.lang.rule declared as Rule Modifier and Type Field Description protected Rule
ParametricRuleViolation. rule
Deprecated.Methods in net.sourceforge.pmd.lang.rule that return Rule Modifier and Type Method Description Rule
AbstractRule. deepCopy()
Rule
RuleReference. deepCopy()
Rule
XPathRule. deepCopy()
Rule
AbstractDelegateRule. getRule()
Deprecated.Rule
ParametricRuleViolation. getRule()
Deprecated.Methods in net.sourceforge.pmd.lang.rule with parameters of type Rule Modifier and Type Method Description void
AbstractDelegateRule. setRule(Rule rule)
Deprecated.This will be removed in 7.0.0 I mark it specially deprecated because it's inherited by rule reference, even though a RuleReference has no business setting its rule after constructionConstructors in net.sourceforge.pmd.lang.rule with parameters of type Rule Constructor Description ParametricRuleViolation(Rule theRule, FileLocation location, String message)
Deprecated.ParametricRuleViolation(Rule theRule, FileLocation location, String message, Map<String,String> additionalInfo)
Deprecated.ParametricRuleViolation(Rule theRule, Reportable node, String message)
Deprecated.Update tests that use this not to call the ctor directly.ParametricRuleViolation(Rule theRule, Reportable node, String message, Map<String,String> additionalInfo)
Deprecated.RuleReference(Rule theRule, RuleSetReference theRuleSetReference)
Create a new reference to the given rule. -
Uses of Rule in net.sourceforge.pmd.rules
Methods in net.sourceforge.pmd.rules that return Rule Modifier and Type Method Description Rule
RuleFactory. buildRule(Element ruleElement, PmdXmlReporter err)
Deprecated.Parses a rule element and returns a new rule instance.Methods in net.sourceforge.pmd.rules with parameters of type Rule Modifier and Type Method Description RuleReference
RuleFactory. decorateRule(Rule referencedRule, RuleSetReference ruleSetReference, Element ruleElement, PmdXmlReporter err)
Deprecated.Decorates a referenced rule with the metadata that are overridden in the given rule element. -
Uses of Rule in net.sourceforge.pmd.util
Methods in net.sourceforge.pmd.util that return Rule Modifier and Type Method Description Rule
ResourceLoader. loadRuleFromClassPath(String clazz)
Deprecated.Load the rule from the classloader from resource loader, consistent with the ruleset
-