groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Theodorou <>
Subject Re: help understanding methodMissing on non-Groovy classes
Date Fri, 10 Nov 2017 10:55:20 GMT

Am 10.11.2017 um 10:33 schrieb Jeremy Heiner:
> Thank you, Jochen! Changing
>> open class Kt
> to
>> import groovy.lang.GroovyObjectSupport
>> open class Kt : GroovyObjectSupport()
> makes everything work as expected. -- Jeremy

ok, I was already guessing this would be the case. There are some cases 
in which the delegate mechanism does not work properly if the delegate 
is no GroovyObject. In general it works perfectly fine if the method you 
delegate to is a static one or if the delegate uses 
invokeMethod/getProperty/setProperty. But methodMissing for example 
seems not to be tried in some cases.

bye Jochen

View raw message