2
我可以以某种方式在参数化构造函数中混入类吗?有没有一种方法可以在Groovy中对mixin进行参数化?
事情是这样的:
class RenderedWithTemplates {
def templates = []
RenderedWithTemplates(templates) { ... }
...
}
@Mixin(RenderedWithTemplates(show: "showAddress.gsp", add: "addAddress.gsp")
class Address { ... }
你尝试[验证码](http://docs.codehaus.org/display/GroovyJSR/Mixins#Mixins-ParamaterizedMixing)? –