接口 GroovyObjectCustomizer


  • 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.

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

      所有方法 实例方法 抽象方法 
      修饰符和类型方法说明
      voidcustomize​(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