|
jxUtil 0.6 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.sourceforge.jxutil.Reflection
Utility functions using reflection.
| Constructor Summary | |
private |
Reflection()
Cannot instantiate. |
| Method Summary | |
static String |
dumpObject(Object obj)
|
(package private) static void |
dumpObject(StringBuffer sb,
Object obj)
|
static Constructor |
findCompatibleConstructor(Class cl,
Object[] oa)
Find a constructor compatible with given objects. |
static Field |
findCompatibleField(Field[] fa,
String name,
Object paramObject)
Find a field given its name and a compatible object. |
static Method |
findCompatibleMethod(Method[] ma,
String name,
Object[] paramObject)
Find a compatible method by name given its parameter objects. |
static Class |
getPrimForWrapper(Class cl)
Get primitive type for given object class. |
static Class |
getWrapperForPrim(Class cl)
Get wrapper class for given primitive type. |
static boolean |
isCompatible(Class[] paramClass,
Object[] paramObject)
Determine if given objects are compatible with corresponding classes. |
static boolean |
isCompatible(Class paramClass,
Object paramObject)
Determine if the given object is assignability compatible with the given class. |
static Object[] |
primitive2ObjectArray(Object primitiveArray)
Turn an array of a primitive type into an Object array of corresponding class type. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
private Reflection()
| Method Detail |
public static String dumpObject(Object obj)
static void dumpObject(StringBuffer sb,
Object obj)
public static Constructor findCompatibleConstructor(Class cl,
Object[] oa)
throws NoSuchMethodError
NoSuchMethodError
public static Field findCompatibleField(Field[] fa,
String name,
Object paramObject)
throws NoSuchFieldException
NoSuchFieldException
public static Method findCompatibleMethod(Method[] ma,
String name,
Object[] paramObject)
throws NoSuchMethodException
NoSuchMethodExceptionpublic static Class getPrimForWrapper(Class cl)
public static Class getWrapperForPrim(Class cl)
public static boolean isCompatible(Class[] paramClass,
Object[] paramObject)
public static boolean isCompatible(Class paramClass,
Object paramObject)
public static Object[] primitive2ObjectArray(Object primitiveArray)
|
jxUtil 0.6 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||