In the following code, I need all the properties available in the Child class (i.e. foo, bar ). I'm not interested in all the other properties added by groovy.
class Parent {def foo} class Child extends Parent {def bar}
So far, none of them have received the result:
println Child.fields println Child.properties.each{k,v->println "$k -> $v"} println Child.declaredFields.findAll { !it.synthetic }.collect {it.name} println Child.methods.findAll {it.name.startsWith("get")}.collect {it.name}
I am trying to find some direct method that would give me this.
source share