|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.security.util.FieldUtils
public final class FieldUtils
Offers static methods for directly manipulating static fields.
Method Summary | |
---|---|
static java.lang.String |
getAccessorName(java.lang.String fieldName,
java.lang.Class<?> type)
|
static java.lang.reflect.Field |
getField(java.lang.Class<?> clazz,
java.lang.String fieldName)
Attempts to locate the specified field on the class. |
static java.lang.Object |
getFieldValue(java.lang.Object bean,
java.lang.String fieldName)
Returns the value of a (nested) field on a bean. |
static java.lang.String |
getMutatorName(java.lang.String fieldName)
|
static java.lang.Object |
getProtectedFieldValue(java.lang.String protectedField,
java.lang.Object object)
|
static void |
setProtectedFieldValue(java.lang.String protectedField,
java.lang.Object object,
java.lang.Object newValue)
|
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 getAccessorName(java.lang.String fieldName, java.lang.Class<?> type)
public static java.lang.reflect.Field getField(java.lang.Class<?> clazz, java.lang.String fieldName) throws java.lang.IllegalStateException
clazz
- the class definition containing the fieldfieldName
- the name of the field to locate
java.lang.IllegalStateException
- if field could not be foundpublic static java.lang.Object getFieldValue(java.lang.Object bean, java.lang.String fieldName) throws java.lang.IllegalAccessException
bean
- the objectfieldName
- the field name, with "." separating nested properties
java.lang.IllegalAccessException
public static java.lang.String getMutatorName(java.lang.String fieldName)
public static java.lang.Object getProtectedFieldValue(java.lang.String protectedField, java.lang.Object object)
public static void setProtectedFieldValue(java.lang.String protectedField, java.lang.Object object, java.lang.Object newValue)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |