public final class FieldUtils extends Object
Modifier and Type | Method and Description |
---|---|
static String |
getAccessorName(String fieldName,
Class type) |
static Field |
getField(Class clazz,
String fieldName)
Attempts to locate the specified field on the class.
|
static String |
getMutatorName(String fieldName) |
static Object |
getProtectedFieldValue(String protectedField,
Object object) |
static void |
setProtectedFieldValue(String protectedField,
Object object,
Object newValue) |
public static Field getField(Class clazz, String fieldName) throws IllegalStateException
clazz
- the class definition containing the fieldfieldName
- the name of the field to locateIllegalStateException
- if field could not be foundpublic static Object getProtectedFieldValue(String protectedField, Object object)
Copyright © 2015. All rights reserved.