|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--net.sf.arise.util.ReflectionUtil
| Method Summary | |
static void |
copy(java.lang.reflect.Field field,
java.lang.Object oldObject,
java.lang.Object newObject)
Copies the value of the given field from oldObjectnewObject, regardless of the field's access
modifiers. |
static java.lang.reflect.Field[] |
getAllFields(java.lang.Class c)
Returns all the fields declared in a class or any of its superclasses |
static java.lang.reflect.Field[] |
getNonStaticDeclaredFields(java.lang.Class clazz)
|
static java.lang.Class |
getPrimitiveType(java.lang.Class clazz)
|
static java.lang.String |
getSimpleClassName(java.lang.Class aClass)
Returns the simple class name for the given class object. |
static java.lang.String |
getSimpleClassName(java.lang.String className)
Returns the simple class name for the given (full or simple) class name. |
static java.lang.reflect.Field[] |
getStaticDeclaredFields(java.lang.Class clazz)
|
static java.lang.String |
getTypeString(java.lang.Class clazz)
|
static java.lang.Object |
getValue(java.lang.reflect.Field field,
java.lang.Object object)
Gets the value of the given field from the given object, regardless of the field's access modifiers. |
static void |
setValue(java.lang.reflect.Field field,
java.lang.Object object,
java.lang.Object value)
Sets the given value of the given field on the given object. |
static void |
sortFields(java.lang.reflect.Field[] fields)
|
static java.lang.String |
stringValueOf(java.lang.Object object)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static java.lang.String getSimpleClassName(java.lang.Class aClass)
Returns the simple class name for the given class object.
aClass - a class object
public static java.lang.String getSimpleClassName(java.lang.String className)
Returns the simple class name for the given (full or simple) class name.
className - a class name, with or without package qualifiers
public static java.lang.reflect.Field[] getAllFields(java.lang.Class c)
c - the class to get the fields from, not null
public static void copy(java.lang.reflect.Field field,
java.lang.Object oldObject,
java.lang.Object newObject)
throws java.lang.IllegalAccessException
oldObjectnewObject, regardless of the field's access
modifiers. The field must not be final.
field - the field to copy, not null, not finaloldObject - the object to copy the value from, not nullnewObject - the object to copy the alue into, not null
java.lang.IllegalAccessException
public static java.lang.Object getValue(java.lang.reflect.Field field,
java.lang.Object object)
throws java.lang.IllegalAccessException
field - the field to copy, not null, not final
java.lang.IllegalAccessException
public static void setValue(java.lang.reflect.Field field,
java.lang.Object object,
java.lang.Object value)
throws java.lang.IllegalAccessException
newObject, regardless of the field's access
modifiers. The field must not be final.
field - the field to copy, not null, not final
java.lang.IllegalAccessExceptionpublic static java.lang.Class getPrimitiveType(java.lang.Class clazz)
public static java.lang.String getTypeString(java.lang.Class clazz)
public static java.lang.String stringValueOf(java.lang.Object object)
public static java.lang.reflect.Field[] getStaticDeclaredFields(java.lang.Class clazz)
public static java.lang.reflect.Field[] getNonStaticDeclaredFields(java.lang.Class clazz)
public static void sortFields(java.lang.reflect.Field[] fields)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
All code and documentation is
Copyright (c) : 2000-2003 Kjetil Valstadsve & Maja S. Bratseth