Class Overview
Offers static methods for directly manipulating fields.
Summary
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
Public Constructors
Public Methods
public
static
Field
getField
(Class<?> clazz, String fieldName)
Attempts to locate the specified field on the class.
Parameters
clazz
| the class definition containing the field |
fieldName
| the name of the field to locate |
public
static
Object
getFieldValue
(Object bean, String fieldName)
Returns the value of a (nested) field on a bean. Intended for testing.
Parameters
bean
| the object |
fieldName
| the field name, with "." separating nested properties |
Returns
- the value of the nested field
public
static
void
setProtectedFieldValue
(String protectedField, Object object, Object newValue)