Groovy元编程——使用invokeMethod和闭包构建DSL和Builder
Since 1.0, Groovy supports the ability to intercept all method and property access via the invokeMethod and get/setProperty hooks. If you only want to intercept failed method/property access take a look at Using methodMissing and propertyMissing.
invokeMethod介绍
invokeMethod(String name, Object args) is at the heart of Groovy metaprog...