public final class ReflectionUtil extends Object
Modifier and Type | Method and Description |
---|---|
static Throwable |
trySetAccessible(AccessibleObject object,
boolean checkAccessible)
Try to call
AccessibleObject.setAccessible(boolean) but will catch any SecurityException and
InaccessibleObjectException and return it. |
public static Throwable trySetAccessible(AccessibleObject object, boolean checkAccessible)
AccessibleObject.setAccessible(boolean)
but will catch any SecurityException
and
InaccessibleObjectException
and return it.
The caller must check if it returns null
and if not handle the returned exception.Copyright © 2008–2024 The Netty Project. All rights reserved.