public class SharedObjectMsg extends Object implements Serializable
createMsg(String)
methods.Modifier and Type | Field and Description |
---|---|
protected String |
clazz |
protected String |
method |
static Object[] |
nullArgs |
static Class[] |
nullTypes |
protected Object[] |
parameters |
Modifier | Constructor and Description |
---|---|
protected |
SharedObjectMsg() |
protected |
SharedObjectMsg(String className,
String methodName,
Object[] parameters) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkAlterMsg()
Check if it is permitted to alter the state of this message (args, class
name, method name).
|
static void |
checkForSerializable(SharedObjectMsg aMsg)
Check a given msg to verify that all Objects in args array implement the
Serializable interface.
|
static SharedObjectMsg |
createMsg(String methodName) |
static SharedObjectMsg |
createMsg(String methodName,
Object arg) |
static SharedObjectMsg |
createMsg(String methodName,
Object[] param) |
static SharedObjectMsg |
createMsg(String className,
String methodName) |
static SharedObjectMsg |
createMsg(String className,
String methodName,
Object arg) |
static SharedObjectMsg |
createMsg(String className,
String methodName,
Object[] param) |
static SharedObjectMsg |
createMsg(String className,
String methodName,
Object arg1,
Object arg2) |
static SharedObjectMsg |
createMsg(String className,
String methodName,
Object arg1,
Object arg2,
Object arg3) |
static SharedObjectMsg |
createMsg(String className,
String methodName,
Object arg1,
Object arg2,
Object arg3,
Object arg4) |
static SharedObjectMsg |
createMsg(String className,
String methodName,
Object arg1,
Object arg2,
Object arg3,
Object arg4,
Object arg5) |
protected Method |
findMethod(Class clazz1) |
static Method |
findMethod(Class clazz,
String meth,
Class[] args)
Find a Method instance on given class.
|
protected Method |
findMethodRecursive(Class clazz1) |
static Method |
findMethodRecursive(Class clazz,
String meth,
Class[] args)
Find a Method instance on given class, and recursively search the class'
superclass tree for given method.
|
static Class |
getClass(ClassLoader loader,
String name)
Utility for getting a Class instance from a String class name.
|
String |
getClassName() |
String |
getMethod() |
static String |
getNameForClass(Class clazz)
Get name for given class.
|
Object[] |
getParameters() |
protected Class[] |
getParameterTypes() |
static Class[] |
getTypesForParameters(Object[] args)
Get array of argument types from array of objects
|
Object |
invoke(Object target) |
static Method |
searchForMethod(Method[] meths,
String meth,
Class[] args) |
void |
setClassName(String name) |
void |
setMethod(String name) |
void |
setParameters(Object[] args) |
String |
toString() |
public static final Object[] nullArgs
public static final Class[] nullTypes
protected String clazz
protected String method
protected Object[] parameters
public static SharedObjectMsg createMsg(String className, String methodName, Object[] param)
public static SharedObjectMsg createMsg(String methodName, Object[] param)
public static SharedObjectMsg createMsg(String methodName)
public static SharedObjectMsg createMsg(String className, String methodName)
public static SharedObjectMsg createMsg(String className, String methodName, Object arg)
public static SharedObjectMsg createMsg(String methodName, Object arg)
public static SharedObjectMsg createMsg(String className, String methodName, Object arg1, Object arg2)
public static SharedObjectMsg createMsg(String className, String methodName, Object arg1, Object arg2, Object arg3)
public static SharedObjectMsg createMsg(String className, String methodName, Object arg1, Object arg2, Object arg3, Object arg4)
public static SharedObjectMsg createMsg(String className, String methodName, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5)
public static Class getClass(ClassLoader loader, String name) throws ClassNotFoundException
loader
- the ClassLoader to use to load the given classname
- of Class to loadClassNotFoundException
- thrown if specified class is not foundpublic static String getNameForClass(Class clazz)
clazz
- the Class to retrieve the name frompublic static Class[] getTypesForParameters(Object[] args)
args
- the arguments to get types forpublic static Method findMethod(Class clazz, String meth, Class[] args)
clazz
- the Class to look onmeth
- the method name to look forargs
- the arguments that will be passed to the method on the invoke
callpublic static Method findMethodRecursive(Class clazz, String meth, Class[] args)
clazz
- the Class to look uponmeth
- the String name of the method to look forargs
- the array of Object arguments that will be passed to the
method for executionpublic static void checkForSerializable(SharedObjectMsg aMsg) throws NotSerializableException
aMsg
- the Message to checkNotSerializableException
- thrown if any objects in args array do not implement
java.io.Serializablepublic final String getMethod()
public final void setMethod(String name)
protected void checkAlterMsg()
public final String getClassName()
public final void setClassName(String name)
public Object[] getParameters()
public final void setParameters(Object[] args)
protected Class[] getParameterTypes()
Copyright © 2017 Eclipse Foundation. All rights reserved.