public class MethExecutor extends Object
| Constructor and Description |
|---|
MethExecutor() |
| Modifier and Type | Method and Description |
|---|---|
static MethExecutorResult |
execute(String receiver,
String selector)
Send the message "selector" to the class named "receiver".
|
static MethExecutorResult |
execute(String receiver,
String selector,
Object[] args)
Executes the given static method on the given class with the
given arguments.
|
static MethExecutorResult |
executeInstance(String receiver,
String selector)
Send the message "selector" to an instance of the class named "receiver".
|
static MethExecutorResult |
executeInstance(String receiver,
String selector,
Class[] types,
Object[] args)
Send the message "selector" to an instance of the class named "receiver".
|
static MethExecutorResult |
executeObject(Object target,
String selector)
Send the message "selector" to the object "target".
|
static MethExecutorResult |
executeObject(Object target,
String selector,
Object[] args)
Executes the given instance method on the given object with the
given arguments.
|
static Method |
getMethod(Class c,
String methodName,
Class[] paramTypes)
Helper method that searches a class (and its superclasses) for a
method with the given name and parameter types.
|
static void |
main(String[] args) |
static String |
testMethod1()
A small program for testing this class.
|
static String |
testMethod2() |
public static Method getMethod(Class c, String methodName, Class[] paramTypes) throws NoSuchMethodException
NoSuchMethodException - If the method cannot be foundpublic static MethExecutorResult execute(String receiver, String selector)
public static MethExecutorResult execute(String receiver, String selector, Object[] args)
public static MethExecutorResult executeObject(Object target, String selector)
public static MethExecutorResult executeObject(Object target, String selector, Object[] args)
public static MethExecutorResult executeInstance(String receiver, String selector)
public static MethExecutorResult executeInstance(String receiver, String selector, Class[] types, Object[] args)
public static String testMethod1()
public static String testMethod2()
public static void main(String[] args)
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.