Re: [Codenarc-developer] Can GetterMethodCouldBeProperty be extended to check static getter methods
Brought to you by:
chrismair
From: Hamlet D'A. <ham...@gm...> - 2012-01-20 05:38:33
|
Looks good to me! -- Hamlet D'Arcy ham...@gm... On Jan 20, 2012 3:02 AM, "Chris Mair" <chr...@ea...> wrote: > If a class defines a static getter method to return a constant, that could > be replaced with a static property.**** > > e.g.**** > > static String getName() {**** > > ‘abc’**** > > }**** > > Could be replaced by:**** > > static (final) name = ‘abc’**** > > ** ** > > So, I am inclined to extend *GetterMethodCouldBeProperty* to check for > static getter methods as well.**** > > ** ** > > > http://codenarc.sourceforge.net/codenarc-rules-groovyism.html#GetterMethodCouldBeProperty > **** > > ** ** > > Any objection?**** > > ** ** > > Chris**** > > > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > _______________________________________________ > Codenarc-developer mailing list > Cod...@li... > https://lists.sourceforge.net/lists/listinfo/codenarc-developer > > |