接口 GroovyObjectCustomizer

函数接口:
这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。

@FunctionalInterface public interface GroovyObjectCustomizer
Strategy used by GroovyScriptFactory to allow the customization of a created GroovyObject.

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.

从以下版本开始:
4.0
作者:
Rod Johnson
另请参阅:
  • 方法概要

    修饰符和类型
    方法
    说明
    void
    customize(groovy.lang.GroovyObject goo)
    Customize the supplied GroovyObject.
  • 方法详细资料

    • customize

      void customize(groovy.lang.GroovyObject goo)
      Customize the supplied GroovyObject.

      For example, this can be used to set a custom metaclass to handle missing methods.

      参数:
      goo - the GroovyObject to customize