Package io.jenkins.plugins.casc.util
Class ExtraFieldUtils
java.lang.Object
org.apache.commons.lang.reflect.FieldUtils
io.jenkins.plugins.casc.util.ExtraFieldUtils
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public class ExtraFieldUtils
extends org.apache.commons.lang.reflect.FieldUtils
Extends
FieldUtils
by adding
some utility methods.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Field
getFieldNoForce
(Class cls, String fieldName) Gets an accessibleField
by name without breaking scope.Methods inherited from class org.apache.commons.lang.reflect.FieldUtils
getDeclaredField, getDeclaredField, getField, getField, readDeclaredField, readDeclaredField, readDeclaredStaticField, readDeclaredStaticField, readField, readField, readField, readField, readStaticField, readStaticField, readStaticField, readStaticField, writeDeclaredField, writeDeclaredField, writeDeclaredStaticField, writeDeclaredStaticField, writeField, writeField, writeField, writeField, writeStaticField, writeStaticField, writeStaticField, writeStaticField
-
Constructor Details
-
ExtraFieldUtils
public ExtraFieldUtils()
-
-
Method Details
-
getFieldNoForce
Gets an accessibleField
by name without breaking scope. Superclasses/interfaces will be considered. This is an equivalent ofFieldUtils.getField(Class, String, boolean)
from the commons lang library, but withoutField.setAccessible(boolean)
invocation.- Parameters:
cls
- the class to reflect, must not be nullfieldName
- the field name to obtain- Returns:
- the Field object, it might be
null
- Throws:
IllegalArgumentException
- if the class or field name is null
-