Top Description Fields Constructors Methods
org.codehaus.groovy.runtime

public Class MethodClosure

extends Closure
Class Inheritance
Imports
groovy.lang.Closure, .MetaMethod, org.codehaus.groovy.reflection.CachedConstructor, .ReflectionCache, java.io.IOException, java.util.Arrays, .List

Represents a method on an object using a closure which can be invoked at any time

Field Summary

Modifier and TypeField and Description
public static boolean
public static final String
private final boolean
private static final Class<T>[]
private final String
public static final String
private static final long
Inherited from groovy.lang.Closure:
DELEGATE_FIRSTDELEGATE_ONLYDONEIDENTITYmaximumNumberOfParametersOWNER_FIRSTOWNER_ONLYparameterTypesSKIPTO_SELF

Constructor Summary

AccessConstructor and Description
public
MethodClosure(Object owner, String method)

Method Summary

Modifier and TypeMethod and Description
protected Object
doCall(Object arguments)

public String
public Object
getProperty(String
the name of the property of interest
property
)

Overrides groovy.lang.Closure.getProperty.

Overrides default groovy.lang.GroovyObject.getProperty.

Retrieves a property value.
private Class<T>[]
private void
private Object
private void
setParameterTypesAndNumber(Class<T>[] newParameterTypes)

Inherited from groovy.lang.Closure:
andThenandThenSelfandThenSelfasWritablecallcallcallclonecomposecomposeSelfcomposeSelfcurrycurrydehydrategetDelegategetDirectivegetMaximumNumberOfParametersgetOwnergetParameterTypesgetResolveStrategygetThisObjectisCaseleftShiftleftShiftmemoizememoizeAtLeastmemoizeAtMostmemoizeBetweenncurryncurryrcurryrcurryrehydraterightShiftrunsetDelegatesetDirectivesetPropertysetResolveStrategythrowRuntimeExceptiontrampolinetrampoline

Field Detail

ALLOW_RESOLVEback to summary
public static boolean ALLOW_RESOLVE
ANY_INSTANCE_METHOD_EXISTSback to summary
public static final String ANY_INSTANCE_METHOD_EXISTS
anyInstanceMethodExistsback to summary
private final boolean anyInstanceMethodExists
EMPTY_CLASS_ARRAYback to summary
private static final Class<T>[] EMPTY_CLASS_ARRAY
methodback to summary
private final String method
NEWback to summary
public static final String NEW
serialVersionUIDback to summary
private static final long serialVersionUID

Hides groovy.lang.Closure.serialVersionUID.

Constructor Detail

MethodClosureback to summary
public MethodClosure(Object owner, String method)

Method Detail

doCallback to summary
protected Object doCall(Object arguments)
getMethodback to summary
public String getMethod()
getPropertyback to summary
public Object getProperty(String property)

Overrides groovy.lang.Closure.getProperty.

Overrides default groovy.lang.GroovyObject.getProperty.

Doc from groovy.lang.GroovyObject.getProperty.

Retrieves a property value.

Parameters
property:String

the name of the property of interest

Returns:Object

the given property

makeParameterTypesback to summary
private Class<T>[] makeParameterTypes(Object owner, MetaMethod m)
readObjectback to summary
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException
readResolveback to summary
private Object readResolve()
setParameterTypesAndNumberback to summary
private void setParameterTypesAndNumber(Class<T>[] newParameterTypes)