groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keegan Witt <keeganw...@gmail.com>
Subject Re: Weird capitalization for setters/getters just again...
Date Fri, 12 Jun 2015 17:55:22 GMT
Yes.  Any time you have a property name starting with a single lower case
letter, followed by an uppercase, it will not capitalize the first letter
in the getter & setter.

-Keegan

On Fri, Jun 12, 2015 at 12:08 PM, OC <ocs@ocs.cz> wrote:

> Hello there,
>
> is this the proper result?
>
> ===
> 29 /tmp> <q.groovy
> class Foo {
>   def aItem
> }
> 30 /tmp> groovyc q.groovy
> 31 /tmp> javap Foo
> Compiled from "q.groovy"
> public class Foo implements groovy.lang.GroovyObject {
> ...
>   public java.lang.Object getaItem();
>   public void setaItem(java.lang.Object);
> ...
> }
> 32 /tmp>
> ===
>
> I would (actually did and my app crashed as a result) presume the
> getter/setter should be named "getAItem", "setAItem". Is this another trick
> of those bloody beans?
>
> Thanks for any insight,
> OC
>
>

Mime
View raw message