Am I missing something?
The concept of automagic properties is nice, but not that useful because generated methods have same permission as fields. The point of a bean/properties is to provide encapsulation. Private fields do not generate access methods. Public fields should typically be avoided.
Doc at:
http://docs.codehaus.org/display/GROOVY/Groovy+Beans class One {
private int xyz
int abc
}
class Two {
private int xyz
int getXyz() {return xyz} // not created automatically for private
void setXyz(int x) {xyz=x} // not created automatically for private
}
def o=new One()
//o.setXyz(1111)// causes exception
o.setAbc(123)// works
def t=new Two()
t.setXyz(222)
Rob.