| java.lang.Object org.codehaus.groovy.runtime.InvokerHelper
InvokerHelper | public class InvokerHelper (Code) | | A static helper class to make bytecode generation easier and act as a facade over the Invoker
author: James Strachan version: $Revision: 4294 $ |
Method Summary | |
public static Iterator | asIterator(Object o) | public static List | asList(Object value) | public static void | assertFailed(Object expression, Object message) | public static Object | bitNegate(Object value) | public static List | createList(Object[] values) | public static Map | createMap(Object[] values) | public static List | createRange(Object from, Object to, boolean inclusive) | public static Script | createScript(Class scriptClass, Binding context) | public static Tuple | createTuple(Object[] array) | public static Matcher | findRegex(Object left, Object right) Find the right hand regex within the left hand string and return a matcher. | protected static String | format(Object arguments, boolean verbose) | public static Object | getAttribute(Object object, String attribute) | public static Object | getGroovyObjectProperty(GroovyObject object, String property) | public static Invoker | getInstance() | public static MetaClass | getMetaClass(Object object) | public static Closure | getMethodPointer(Object object, String methodName) | public static Object | getProperty(Object object, String property) | public static Object | getPropertySafe(Object object, String property) | public static String | getVersion() | public static String | inspect(Object self) | public static Object | invokeClosure(Object closure, Object arguments) | public static Object | invokeConstructorOf(Class type, Object arguments) | public static Object | invokeConstructorOf(String klass, Object arguments) | public static Object | invokeMethod(Object object, String methodName, Object arguments) | public static Object | invokeMethodSafe(Object object, String methodName, Object arguments) | public static Object | invokeNoArgumentsConstructorOf(Class type) | public static Object | invokeNoArgumentsMethod(Object object, String methodName) | public static Object | invokeStaticMethod(Class type, String methodName, Object arguments) | public static Object | invokeStaticMethod(String klass, String methodName, Object arguments) | public static Object | invokeStaticNoArgumentsMethod(Class type, String methodName) | public static Object | invokeSuperMethod(Object object, String methodName, Object arguments) | public static boolean | matchRegex(Object left, Object right) Find the right hand regex within the left hand string and return a matcher. | public static Object | negate(Object value) | public static void | removeClass(Class clazz) | public static Object | runScript(Class scriptClass, String[] args) | public static void | setAttribute(Object object, String attribute, Object newValue) | public static void | setGroovyObjectProperty(Object newValue, GroovyObject object, String property) This is so we don't have to reorder the stack when we call this method. | public static void | setProperties(Object object, Map map) | public static void | setProperty(Object object, String property, Object newValue) | public static void | setProperty2(Object newValue, Object object, String property) This is so we don't have to reorder the stack when we call this method. | public static void | setPropertySafe2(Object newValue, Object object, String property) This is so we don't have to reorder the stack when we call this method. | public static SpreadMap | spreadMap(Object value) | public static String | toArrayString(Object[] arguments) A helper method to return the string representation of an arrray of objects
with brace boundaries "{" and "}". | public static String | toListString(Collection arg) A helper method to return the string representation of a list with bracket boundaries "[" and "]". | public static String | toMapString(Map arg) A helper method to return the string representation of a map with bracket boundaries "[" and "]". | public static String | toString(Object arguments) | public static String | toTypeString(Object[] arguments) | public static void | write(Writer out, Object object) |
findRegex | public static Matcher findRegex(Object left, Object right)(Code) | | Find the right hand regex within the left hand string and return a matcher.
Parameters: left - string to compare Parameters: right - regular expression to compare the string to |
getMethodPointer | public static Closure getMethodPointer(Object object, String methodName)(Code) | | Returns the method pointer for the given object name
|
invokeNoArgumentsConstructorOf | public static Object invokeNoArgumentsConstructorOf(Class type)(Code) | | |
invokeStaticNoArgumentsMethod | public static Object invokeStaticNoArgumentsMethod(Class type, String methodName)(Code) | | |
matchRegex | public static boolean matchRegex(Object left, Object right)(Code) | | Find the right hand regex within the left hand string and return a matcher.
Parameters: left - string to compare Parameters: right - regular expression to compare the string to |
removeClass | public static void removeClass(Class clazz)(Code) | | |
setGroovyObjectProperty | public static void setGroovyObjectProperty(Object newValue, GroovyObject object, String property)(Code) | | This is so we don't have to reorder the stack when we call this method.
At some point a better name might be in order.
|
setProperties | public static void setProperties(Object object, Map map)(Code) | | Sets the properties on the given object
Parameters: object - Parameters: map - |
setProperty2 | public static void setProperty2(Object newValue, Object object, String property)(Code) | | This is so we don't have to reorder the stack when we call this method.
At some point a better name might be in order.
|
setPropertySafe2 | public static void setPropertySafe2(Object newValue, Object object, String property)(Code) | | This is so we don't have to reorder the stack when we call this method.
At some point a better name might be in order.
|
toArrayString | public static String toArrayString(Object[] arguments)(Code) | | A helper method to return the string representation of an arrray of objects
with brace boundaries "{" and "}".
|
toListString | public static String toListString(Collection arg)(Code) | | A helper method to return the string representation of a list with bracket boundaries "[" and "]".
|
toMapString | public static String toMapString(Map arg)(Code) | | A helper method to return the string representation of a map with bracket boundaries "[" and "]".
|
toTypeString | public static String toTypeString(Object[] arguments)(Code) | | A helper method to format the arguments types as a comma-separated list
|
|
|