Class MethodClosure

  • All Implemented Interfaces:
    GroovyCallable, GroovyObject, java.io.Serializable, java.lang.Cloneable, java.lang.Runnable, java.util.concurrent.Callable

    public class MethodClosure
    extends Closure
    Represents a method on an object using a closure which can be invoked at any time
    See Also:
    Serialized Form
    • Field Detail

      • ALLOW_RESOLVE

        public static boolean ALLOW_RESOLVE
    • Constructor Detail

      • MethodClosure

        public MethodClosure​(java.lang.Object owner,
                             java.lang.String method)
    • Method Detail

      • getMethod

        public java.lang.String getMethod()
      • doCall

        protected java.lang.Object doCall​(java.lang.Object arguments)
      • getProperty

        public java.lang.Object getProperty​(java.lang.String property)
        Description copied from interface: GroovyObject
        Retrieves a property value.
        Specified by:
        getProperty in interface GroovyObject
        Overrides:
        getProperty in class Closure
        Parameters:
        property - the name of the property of interest
        Returns:
        the given property