class GetterMethodCouldBePropertyRule extends AbstractAstVisitorRule
If a class defines a public method that follows the Java getter notation and returns a constant, then it is cleaner to provide a Groovy property for the value rather than a Groovy method.
| 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 |
ignoreMethodsWithOverrideAnnotation |
java.lang.String |
name |
int |
priority |
| Constructor and description |
|---|
GetterMethodCouldBePropertyRule
() |
Groovy Documentation