class ExplicitCallToCompareToMethodRule extends AbstractAstVisitorRule
This rule detects when the compareTo(Object) method is called directly in code instead of using the <=>, >, >=, <, and <= operators. A groovier way to express this: a.compareTo(b) is this: a <=> b, or using the other operators.
Fields inherited from class | Fields |
---|---|
class AbstractAstVisitorRule |
CLOSURE_TEXT, DEFAULT_CONST_NAME, DEFAULT_FIELD_NAME, DEFAULT_TEST_CLASS_NAMES, DEFAULT_TEST_FILES, DEFAULT_VAR_NAME |
Type | Name and description |
---|---|
java.lang.Class |
astVisitorClass |
boolean |
ignoreThisReference |
java.lang.String |
name |
int |
priority |
Constructor and description |
---|
ExplicitCallToCompareToMethodRule
() |
Groovy Documentation