List the methods of a groovy class
This snippet show how to get a list of all methods in a groovy class.
class Person {
String firstname
String lastname
int age
}
println new Person().metaClass.methods*.name.sort().unique()
["equals", "getAge", "getClass", "getFirstname", "getLastname", "getMetaClass", "getProperty", "hashCode", "invokeMethod", "notify", "notifyAll", "setAge", "setFirstname", "setLastname", "setMetaClass", "setProperty", "toString", "wait"]