I have an instance of a java object, say an ArrayList instance called myList.
For this particular instance, I want to override the invokeMethod method for (say) the log that called this method.
I could do something like this:
myList.metaclass.invokeMethod { name, args -> println "Called ${name} with ${args}" whatGoesHere.invokeMethod(name, args) }
Note the second closing line - how can I call the original invokeMethod method? Am I doing it right?
source share