Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

This section details how to go about using the dynamic features of Groovy such as implementing the GroovyObject interface and using ExpandoMetaClass, a expandable MetaClass that allows adding of methods, properties and constructors.

Dynamic Method Invocation

You can invoke a method even if you don't know the method name until it is invoked:

You can also "spread" the arguments in a method call, when you have a list of arguments:

This also works in combination of the invocation with a GString:

  • No labels