I've used Groovy's method Pointers for just this nefarious purpose in Listing 10.
在清单10中,我使用了Groovy的方法指针来做这件坏事。
Now, don't get me wrong: Method pointers aren't meant for hacking into code or obtaining references to people's cash!
现在,不要误会我:方法指针不是为了侵入代码或者获得对人们现金的引用!
The interesting thing about method Pointers is that their use can be an indication that the code violates the Law of Demeter.
关于方法指针,有意思的事情是:它们的使用可能就表明代码违反了迪米特法则。
应用推荐