Top Constructors Methods
io.netty5.util.internal

public final Class ReflectionUtil

extends Object
Class Inheritance
Imports
java.lang.reflect.AccessibleObject, .InaccessibleObjectException

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Throwable
trySetAccessible(AccessibleObject object, boolean checkAccessible)

Try to call AccessibleObject#setAccessible(boolean) but will catch any SecurityException and InaccessibleObjectException and return it.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ReflectionUtilback to summary
private ReflectionUtil()

Method Detail

trySetAccessibleback to summary
public static Throwable trySetAccessible(AccessibleObject object, boolean checkAccessible)

Try to call 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.