| java.lang.Object org.codehaus.groovy.runtime.Invoker
Invoker | public class Invoker (Code) | | A helper class to invoke methods or extract properties on arbitrary Java objects dynamically
author: James Strachan version: $Revision: 4294 $ |
Method Summary | |
public Object[] | asArray(Object arguments) | public Object | getAttribute(Object object, String attribute) | public MetaClass | getMetaClass(Object object) | public MetaClassRegistry | getMetaRegistry() | public Closure | getMethodPointer(Object object, String methodName) | public Object | getProperty(Object object, String property) | public Object | invokeConstructorOf(Class type, Object arguments) | public Object | invokeMethod(Object object, String methodName, Object arguments) Invokes the given method on the object. | public Object | invokeStaticMethod(Class type, String method, Object arguments) | public Object | invokeSuperMethod(Object object, String methodName, Object arguments) | public void | removeMetaClass(Class clazz) | public void | setAttribute(Object object, String attribute, Object newValue) | public void | setProperty(Object object, String property, Object newValue) |
EMPTY_ARGUMENTS | final protected static Object[] EMPTY_ARGUMENTS(Code) | | |
EMPTY_TYPES | final protected static Class[] EMPTY_TYPES(Code) | | |
asArray | public Object[] asArray(Object arguments)(Code) | | Converts the given object into an array; if its an array then just
cast otherwise wrap it in an array
|
getAttribute | public Object getAttribute(Object object, String attribute)(Code) | | Looks up the given attribute (field) on the given object
|
getMethodPointer | public Closure getMethodPointer(Object object, String methodName)(Code) | | Returns the method pointer for the given object name
|
getProperty | public Object getProperty(Object object, String property)(Code) | | Looks up the given property of the given object
|
invokeMethod | public Object invokeMethod(Object object, String methodName, Object arguments)(Code) | | Invokes the given method on the object.
Parameters: object - Parameters: methodName - Parameters: arguments - |
removeMetaClass | public void removeMetaClass(Class clazz)(Code) | | |
setAttribute | public void setAttribute(Object object, String attribute, Object newValue)(Code) | | Sets the given attribute (field) on the given object
|
setProperty | public void setProperty(Object object, String property, Object newValue)(Code) | | Sets the property on the given object
|
|
|