Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Missed a couple of )'s in code example

...

Code Block
println obj.metaClass.methods
println obj.metaClass.methods.find { it.name.startsWith("to") }

The same can be done for properties:

Code Block
println obj.metaClass.properties
println obj.metaClass.properties.find { it.name.startsWith("to") }

Using respondsTo and hasProperty

...