public class MethodClosure
extends Closure
Represents a method on an object using a closure, which can be invoked at any time.
| Modifiers | Name | Description |
|---|---|---|
static boolean |
ALLOW_RESOLVE |
|
static String |
ANY_INSTANCE_METHOD_EXISTS |
Property name indicating whether an instance method exists for this method closure. |
static String |
NEW |
Method name constant for constructor invocations. |
| Fields inherited from class | Fields |
|---|---|
class Closure |
DELEGATE_FIRST, DELEGATE_ONLY, DONE, IDENTITY, OWNER_FIRST, OWNER_ONLY, TO_SELF, maximumNumberOfParameters, parameterTypes |
| Constructor and description |
|---|
MethodClosure(Object owner, String method)Constructs a MethodClosure wrapping a method of the given owner object. |
| Methods inherited from class | Name |
|---|---|
class Closure |
andThen, andThenSelf, andThenSelf, asWritable, call, call, call, checkForReferenceCycle, clone, compose, composeSelf, composeSelf, curry, curry, dehydrate, getDelegate, getDirective, getMaximumNumberOfParameters, getOwner, getParameterTypes, getProperty, getResolveStrategy, getThisObject, isCase, leftShift, leftShift, memoize, memoizeAtLeast, memoizeAtMost, memoizeBetween, ncurry, ncurry, rcurry, rcurry, rehydrate, rightShift, run, setDelegate, setDirective, setProperty, setResolveStrategy, throwRuntimeException, trampoline, trampoline |
class GroovyObjectSupport |
getMetaClass, setMetaClass |
Property name indicating whether an instance method exists for this method closure.
Method name constant for constructor invocations.
Returns the class of the owner object, unwrapping it if it's a Wrapper. If the owner is a Class, returns that Class; otherwise, returns the class of the owner.
Copyright © 2003-2026 The Apache Software Foundation. All rights reserved.