接口 GroovyObjectCustomizer
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
@FunctionalInterface public interface GroovyObjectCustomizer
Strategy used byGroovyScriptFactory
to allow the customization of a createdGroovyObject
.This is useful to allow the authoring of DSLs, the replacement of missing methods, and so forth. For example, a custom
MetaClass
could be specified.- 从以下版本开始:
- 2.0.2
- 作者:
- Rod Johnson
- 另请参阅:
GroovyScriptFactory
方法详细资料
customize
void customize(groovy.lang.GroovyObject goo)
Customize the suppliedGroovyObject
.For example, this can be used to set a custom metaclass to handle missing methods.
- 参数:
goo
- theGroovyObject
to customize