[Java] Class MethodClosure
- org.codehaus.groovy.runtime.MethodClosure
public class MethodClosure extends Closure
Represents a method on an object using a closure which can be invoked at any time
Field Summary
Modifiers | Name | Description |
---|---|---|
static boolean | ALLOW_RESOLVE | |
static String | ANY_INSTANCE_METHOD_EXISTS | |
static String | NEW |
Fields inherited from class | Fields |
---|---|
class Closure | OWNER_FIRST, DELEGATE_FIRST, OWNER_ONLY, DELEGATE_ONLY, TO_SELF, DONE, SKIP, IDENTITY |
Constructor Summary
Constructor and description |
---|
MethodClosure
(Object owner, String method) |
Methods Summary
Type Params | Return Type | Name and description |
---|---|---|
protected Object |
doCall(Object arguments) | |
public String |
getMethod() | |
public Object |
getProperty(String property) |
Inherited Methods Summary
Methods inherited from class | Name |
---|---|
class Closure | run, getProperty, clone, getParameterTypes, setProperty, getOwner, setDelegate, call, call, call, andThen, memoize, getDelegate, leftShift, leftShift, dehydrate, getResolveStrategy, ncurry, ncurry, rightShift, memoizeAtLeast, rehydrate, setDirective, trampoline, trampoline, getDirective, isCase, curry, curry, asWritable, rcurry, rcurry, memoizeAtMost, memoizeBetween, setResolveStrategy, getThisObject, getMaximumNumberOfParameters, andThenSelf, andThenSelf, composeSelf, composeSelf, compose, getMetaClass, setMetaClass, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll, invokeMethod |
Field Detail
public static boolean ALLOW_RESOLVE
public static final String ANY_INSTANCE_METHOD_EXISTS
public static final String NEW
Constructor Detail
public MethodClosure(Object owner, String method)
Method Detail
protected Object doCall(Object arguments)
public String getMethod()
public Object getProperty(String property)
© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/3.0.7/html/gapi/org/codehaus/groovy/runtime/MethodClosure.html