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

public Class TransformMetaMethod

extends MetaMethod
Class Inheritance
Imports
groovy.lang.MetaMethod, org.codehaus.groovy.reflection.CachedClass

A MetaMethod implementation useful for implementing coercion based invocations

Field Summary

Modifier and TypeField and Description
private final MetaMethod
Inherited from groovy.lang.MetaMethod:
EMPTY_ARRAY

Constructor Summary

AccessConstructor and Description
public
TransformMetaMethod(final MetaMethod metaMethod)

Method Summary

Modifier and TypeMethod and Description
public Object
doMethodInvoke(final Object
The object the method is to be called at.
object
,
final Object[]
Arguments for the method invocation.
arguments
)

Overrides groovy.lang.MetaMethod.doMethodInvoke.

Invokes the method this object represents.
public CachedClass
getDeclaringClass()

Implements abstract groovy.lang.MetaMethod.getDeclaringClass.

Gets the class where this method is declared
public int
getModifiers()

Implements abstract groovy.lang.MetaMethod.getModifiers.

Returns the modifiers for this method
public String
getName()

Implements abstract groovy.lang.MetaMethod.getName.

Returns the name of the method represented by this class
public Class<T>
getReturnType()

Implements abstract groovy.lang.MetaMethod.getReturnType.

Access the return type for this method
public Object
invoke(final Object
The object this method should be invoked on
object
,
final Object[]
The arguments for the method if applicable
arguments
)

Implements abstract groovy.lang.MetaMethod.invoke.

Invoke this method
Inherited from groovy.lang.MetaMethod:
checkParameterscloneequalequalgetDescriptorgetMopNamegetSignatureisAbstractisCacheableisMethodisPrivateisProtectedisPublicisSameisStaticprocessDoMethodInvokeExceptiontoString

Field Detail

metaMethodback to summary
private final MetaMethod metaMethod

Constructor Detail

TransformMetaMethodback to summary
public TransformMetaMethod(final MetaMethod metaMethod)

Method Detail

doMethodInvokeback to summary
public Object doMethodInvoke(final Object object, final Object[] arguments)

Overrides groovy.lang.MetaMethod.doMethodInvoke.

Doc from groovy.lang.MetaMethod.doMethodInvoke.

Invokes the method this object represents. This method is not final but it should be overloaded very carefully and only by generated methods there is no guarantee that it will be called

Parameters
object:Object

The object the method is to be called at.

arguments:Object[]

Arguments for the method invocation.

Returns:Object

The return value of the invoked method.

Annotations
@Override
getDeclaringClassback to summary
public CachedClass getDeclaringClass()

Implements abstract groovy.lang.MetaMethod.getDeclaringClass.

Doc from groovy.lang.MetaMethod.getDeclaringClass.

Gets the class where this method is declared

Returns:CachedClass

class of this method

getModifiersback to summary
public int getModifiers()

Implements abstract groovy.lang.MetaMethod.getModifiers.

Doc from groovy.lang.MetaMethod.getModifiers.

Returns the modifiers for this method

Returns:int

modifiers as an int.

getNameback to summary
public String getName()

Implements abstract groovy.lang.MetaMethod.getName.

Doc from groovy.lang.MetaMethod.getName.

Returns the name of the method represented by this class

Returns:String

name of this method

getReturnTypeback to summary
public Class<T> getReturnType()

Implements abstract groovy.lang.MetaMethod.getReturnType.

Doc from groovy.lang.MetaMethod.getReturnType.

Access the return type for this method

Returns:Class<T>

the return type of this method

invokeback to summary
public Object invoke(final Object object, final Object[] arguments)

Implements abstract groovy.lang.MetaMethod.invoke.

Doc from groovy.lang.MetaMethod.invoke.

Invoke this method

Parameters
object:Object

The object this method should be invoked on

arguments:Object[]

The arguments for the method if applicable

Returns:Object

The return value of the invocation

Annotations
@Override