Groovy Documentation

groovy.org.codenarc.rule.groovyism
[Groovy] Class GetterMethodCouldBePropertyRule

java.lang.Object
  org.codenarc.rule.AbstractAstVisitorRule
      groovy.org.codenarc.rule.groovyism.GetterMethodCouldBePropertyRule

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.

Authors:
Hamlet D'Arcy
Chris Mair


Property Summary
Class astVisitorClass

String name

int priority

 

Property Detail

astVisitorClass

Class astVisitorClass


name

String name


priority

int priority


 

Groovy Documentation