Utility reflection methods focused on constructors, modeled after {@link MethodUtils}.
There is an issue when invoking {@code public} constructorscontained in a default access superclass. Reflection correctly locates these constructors and assigns them as {@code public}. However, an {@link IllegalAccessException} is thrown if the constructor isinvoked.
{@link ConstructorUtils} contains a workaround for this situation: itwill attempt to call {@link java.lang.reflect.AccessibleObject#setAccessible(boolean)} on this constructor. If thiscall succeeds, then the method can be invoked as normal. This call will only succeed when the application has sufficient security privileges. If this call fails then a warning will be logged and the method may fail.
@since 2.5 @version $Id: ConstructorUtils.java 1534831 2013-10-22 22:41:06Z mbenson $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|