spring-framework / org.springframework.util / ReflectionUtils / makeAccessible

makeAccessible

open static fun makeAccessible(field: Field): Unit

Make the given field accessible, explicitly setting it accessible if necessary. The setAccessible(true) method is only called when actually necessary, to avoid unnecessary conflicts with a JVM SecurityManager (if active).

Parameters

field - the field to make accessible

See Also
java.lang.reflect.Field#setAccessible

open static fun makeAccessible(method: Method): Unit

Make the given method accessible, explicitly setting it accessible if necessary. The setAccessible(true) method is only called when actually necessary, to avoid unnecessary conflicts with a JVM SecurityManager (if active).

Parameters

method - the method to make accessible

See Also
java.lang.reflect.Method#setAccessible

open static fun makeAccessible(ctor: Constructor<*>): Unit

Make the given constructor accessible, explicitly setting it accessible if necessary. The setAccessible(true) method is only called when actually necessary, to avoid unnecessary conflicts with a JVM SecurityManager (if active).

Parameters

ctor - the constructor to make accessible

See Also
java.lang.reflect.Constructor#setAccessible