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

public Class NewStaticMetaMethod

extends NewMetaMethod
Class Inheritance
Imports
org.codehaus.groovy.reflection.CachedMethod, java.lang.reflect.Modifier

A MetaMethod implementation where the underlying method is really a static helper method on some class. This implementation is used to add new static methods to the JDK writing them as normal static methods with the first parameter being the class on which the method is added.

Field Summary

Inherited from org.codehaus.groovy.runtime.metaclass.NewMetaMethod:
bytecodeParameterTypesEMPTY_TYPE_ARRAY

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public int
public Object
invoke(Object
The object this method should be invoked on
object
,
Object[]
The arguments for the method if applicable
arguments
)

Overrides org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke.

Invoke this method
public boolean
isStatic()

Overrides groovy.lang.MetaMethod.isStatic.

Returns whether or not this method is static.
Inherited from org.codehaus.groovy.runtime.metaclass.NewMetaMethod:
getBytecodeParameterTypesgetDeclaringClassgetOwnerClass

Constructor Detail

NewStaticMetaMethodback to summary
public NewStaticMetaMethod(CachedMethod method)

Method Detail

getModifiersback to summary
public int getModifiers()

Overrides org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.getModifiers.

Doc from groovy.lang.MetaMethod.getModifiers.

Returns the modifiers for this method

Returns:int

modifiers as an int.

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

Overrides org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.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

isStaticback to summary
public boolean isStatic()

Overrides groovy.lang.MetaMethod.isStatic.

Doc from groovy.lang.MetaMethod.isStatic.

Returns whether or not this method is static.

Returns:boolean

true if this method is static