Class Rule
- java.lang.Object
-
- net.kemitix.checkstyle.ruleset.builder.Rule
-
public class Rule extends Object
A single Checkstyle Check.- Author:
- Paul Campbell (pcampbell@kemitix.net)
-
-
Constructor Summary
Constructors Constructor Description Rule()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetSource()The name of the source for the rule.booleanisFromSource(String sourceName)Checks that this rule comes from the source named.protected static intsortByName(Rule left, Rule right)Compare two Rules lexicographically for sorting by rule name, ignoring case.
-
-
-
Method Detail
-
sortByName
protected static int sortByName(Rule left, Rule right)
Compare two Rules lexicographically for sorting by rule name, ignoring case.- Parameters:
left- the first ruleright- the second rule- Returns:
- the value 0 if the rules are equal; a value less than 0 if the left string is lexicographically less than the right string; and a value greater than 0 if the left string is lexicographically greater than the right string.
-
isFromSource
public boolean isFromSource(String sourceName)
Checks that this rule comes from the source named.- Parameters:
sourceName- the name of the source to check against- Returns:
- true if this rule comes from the source
-
getSource
public String getSource()
The name of the source for the rule.- Returns:
- the source name, in lowercase.
-
-