The ability is provided to break the scoping restrictions coded by the programmer. This can allow fields to be changed that shouldn't be. This facility should be used with care.
| Modifier and Type | Field and Description |
|---|---|
| private static final Map |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private static Field | Returns: theField corresponding to the given fieldName for the specified class.the name of the field to get fieldName, Class<?> the class to introspect acls)Returns the |
| pack-priv static Field | Returns: the Field objectthe class to reflect, must not be null cls, String the field name to obtain fieldName, boolean whether to break scope restrictions using the forceAccess)setAccessible method.
False will only match public fields.Gets an accessible |
| private static Object | |
| private static Object | |
| pack-priv static Object |
| fieldsPerClass | back to summary |
|---|---|
| private static final Map<Class<?>, Map<String, Field>> fieldsPerClass | |
| FieldUtils | back to summary |
|---|---|
| pack-priv FieldUtils() | |
| getDeclaredField | back to summary |
|---|---|
| private static Field getDeclaredField(String fieldName, Class<?> acls) throws NoSuchFieldException Returns the Caches the field after getting it for efficiency.
| |
| getField | back to summary |
|---|---|
| pack-priv static Field getField(final Class<?> cls, String fieldName, boolean forceAccess) throws IllegalAccessException Gets an accessible
| |
| readField | back to summary |
|---|---|
| private static Object readField(Field field, Object target) throws IllegalAccessException Reads an accessible Field.
| |
| readField | back to summary |
|---|---|
| private static Object readField(Field field, Object target, boolean forceAccess) throws IllegalAccessException Reads a Field.
| |
| readField | back to summary |
|---|---|
| pack-priv static Object readField(Object target, String fieldName, boolean forceAccess) throws IllegalAccessException Reads the named field. Superclasses will be considered. Since 3.19.0 static and synthetic fields are ignored.
| |