The title ask it all : How to get all property names of a Groovy class?
Is it even possible? I thought I could use collection syntaxes with classes too be it don't seem to work.
The title ask it all : How to get all property names of a Groovy class?
Is it even possible? I thought I could use collection syntaxes with classes too be it don't seem to work.
Can you use Java Reflection API?
Take a look at getDeclaredFields of java.lang.Class.
According to this thread this should be possible through properties.each
http://stackoverflow.com/questions/1477706/groovy-property-iteration