Adjusting for Groovy JavaBeans specification compatibility changes
Groovy properties
class Person {
String name
int age
}class PseudoProperties {
//1. a pseudo property "name"
void setName(String name) {}
String getName() {}
//2. a pseudo read-only property "age"
int getAge() { 42 }
//3. a pseudo write-only property "groovy"
void setGroovy(boolean groovy) { }
}
def p = new PseudoProperties()
p.name = 'Foo' // uses (1)
assert p.age == 42 // uses (2)
p.groovy = true // uses (3)Groovy 3 breaking change
Recommendation
Last updated
Was this helpful?