public class RuleSet
extends java.lang.Object
Rule
Constructor and Description |
---|
RuleSet() |
Modifier and Type | Method and Description |
---|---|
void |
addExcludePattern(java.lang.String excludePattern) |
void |
addExcludePatterns(java.util.List<java.lang.String> excludePatterns) |
void |
addIncludePattern(java.lang.String includePattern) |
void |
addIncludePatterns(java.util.List<java.lang.String> includePatterns) |
void |
addRule(Rule rule)
Add a new rule to this ruleset
|
void |
addRuleByReference(java.lang.String ruleSetFileName,
Rule rule)
Add a new rule by reference to this ruleset.
|
void |
addRuleSet(RuleSet ruleSet)
Add a whole RuleSet to this RuleSet
|
void |
addRuleSetByReference(RuleSet ruleSet,
boolean allRules)
Add all rules by reference from one RuleSet to this RuleSet.
|
boolean |
applies(java.io.File file)
Check if a given source file should be checked by rules in this RuleSet.
|
void |
apply(java.util.List acuList,
RuleContext ctx) |
void |
end(RuleContext ctx) |
boolean |
equals(java.lang.Object o) |
java.lang.String |
getDescription() |
java.util.List<java.lang.String> |
getExcludePatterns() |
java.lang.String |
getFileName() |
java.util.List<java.lang.String> |
getIncludePatterns() |
Language |
getLanguage() |
java.lang.String |
getName() |
Rule |
getRuleByName(java.lang.String ruleName)
Returns the Rule with the given name
|
java.util.Collection<Rule> |
getRules()
Returns the actual Collection of rules in this ruleset
|
int |
hashCode() |
void |
setDescription(java.lang.String description) |
void |
setExcludePatterns(java.util.List<java.lang.String> excludePatterns) |
void |
setFileName(java.lang.String fileName) |
void |
setIncludePatterns(java.util.List<java.lang.String> includePatterns) |
void |
setLanguage(Language language) |
void |
setName(java.lang.String name) |
int |
size()
Returns the number of rules in this ruleset
|
void |
start(RuleContext ctx) |
boolean |
usesDFA() |
boolean |
usesTypeResolution() |
public int size()
public void addRule(Rule rule)
rule
- the rule to be addedpublic void addRuleByReference(java.lang.String ruleSetFileName, Rule rule)
ruleSetFileName
- the ruleset which contains the rulerule
- the rule to be addedpublic java.util.Collection<Rule> getRules()
Rule
public boolean usesDFA()
public Rule getRuleByName(java.lang.String ruleName)
ruleName
- the name of the rule to findpublic void addRuleSet(RuleSet ruleSet)
ruleSet
- the RuleSet to addpublic void addRuleSetByReference(RuleSet ruleSet, boolean allRules)
ruleSet
- the RuleSet to addallRules
- public boolean applies(java.io.File file)
exclude
pattern which matches
the file, unless there is an include
pattern which also matches
the file. In other words, include
patterns override exclude
patterns.file
- the source file to checktrue
if the file should be checked, false
otherwisepublic void start(RuleContext ctx)
public void apply(java.util.List acuList, RuleContext ctx)
public void end(RuleContext ctx)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public Language getLanguage()
public void setLanguage(Language language)
public java.lang.String getFileName()
public void setFileName(java.lang.String fileName)
public java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.String getDescription()
public void setDescription(java.lang.String description)
public java.util.List<java.lang.String> getExcludePatterns()
public void addExcludePattern(java.lang.String excludePattern)
public void addExcludePatterns(java.util.List<java.lang.String> excludePatterns)
public void setExcludePatterns(java.util.List<java.lang.String> excludePatterns)
public java.util.List<java.lang.String> getIncludePatterns()
public void addIncludePattern(java.lang.String includePattern)
public void addIncludePatterns(java.util.List<java.lang.String> includePatterns)
public void setIncludePatterns(java.util.List<java.lang.String> includePatterns)
public boolean usesTypeResolution()