|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--org.openorb.util.ReflectionUtils
Various reflection utilities.
| Method Summary | |
static Method |
getReadObjectMethod(Class clz)
Get the readObject( java.io.ObjectInputStream ) method from the class and set accessibility to true. |
static Method |
getReadResolveMethod(Class clz)
Get the readResolve() method from the class and set accessibility to true. |
static Object |
getStubInstance(Class clz,
Object obj)
Return an instance of the specified stub and set the delegate to the one from the specified object. |
static Method |
getWriteObjectMethod(Class clz)
Get the readObject( java.io.ObjectInputStream ) method from the class and set accessibility to true. |
static Method |
getWriteReplaceMethod(Class clz)
Get the writeReplace() method from the class and set accessibility to true. |
static boolean |
hasReadObjectMethod(Class clz)
|
static boolean |
hasWriteObjectMethod(Class clz)
Check whether the class has a readObject( java.io.ObjectInputStream ) method. |
static Object |
invokeMethod(Object obj,
String methName,
Class[] types,
Object[] params)
Invoke a method on the specified object. |
static boolean |
isAssignableFrom(String generalClzName,
Class specialClz)
Do the isAssignableFrom check but without loading the class. |
static boolean |
readObject(Method read_object,
Object target,
ObjectInputStream is)
Call the readObject method. |
static Object |
readResolve(Method read_resolve,
Object target)
Call the readResolve method. |
static void |
writeObject(Method write_object,
Object target,
ObjectOutputStream os)
Call the writeObject method. |
static Object |
writeReplace(Method write_replace,
Object target)
Call the writeReplace method. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static Object invokeMethod(Object obj,
String methName,
Class[] types,
Object[] params)
obj - The object on which to invoke the method.methName - The name of the method.types - The parameter types.params - The parameter values.
public static Object getStubInstance(Class clz,
Object obj)
clz - The stub class.obj - The object to take the delegate from.
public static boolean isAssignableFrom(String generalClzName,
Class specialClz)
generalClzName - The class which should be checked whether it is assignable from.specialClz - The special class that is checked to be assignable to the general one.public static boolean hasWriteObjectMethod(Class clz)
clz - The class to check.public static Method getWriteObjectMethod(Class clz)
clz - The class to get the writeObject() method from.public static boolean hasReadObjectMethod(Class clz)
public static Method getReadObjectMethod(Class clz)
clz - The class to get the readObject() method from.public static Method getReadResolveMethod(Class clz)
clz - The class to get the readResolve() method from.public static Method getWriteReplaceMethod(Class clz)
clz - The class to get the writeReplace() method from.
public static boolean readObject(Method read_object,
Object target,
ObjectInputStream is)
throws IOException,
ClassNotFoundException
read_object - The readObject() method.target - The object on which to call the readObject() method.is - The input stream to pass to the readObject() method.IOException - An exception that might occur during the readObject() call.
public static void writeObject(Method write_object,
Object target,
ObjectOutputStream os)
throws IOException
write_object - The write_object method.target - The object on which to call the writeObject() method.os - The output stream to pass to the writeObject() method.IOException - That might occur during the writeReplace() call.
public static Object readResolve(Method read_resolve,
Object target)
throws ObjectStreamException
read_resolve - The readResolve() method.target - The object on which to call the readResolve() method.
public static Object writeReplace(Method write_replace,
Object target)
throws ObjectStreamException
write_replace - The writeReplace() method.target - The object on which to call the writeReplace() method.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||