| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static void | ensureMemberAccess(Class<?>
the class performing the access currentClass, Class<?> the declaring class of the member being accessed memberClass, Object the target object if accessing instance field or method;
or null if accessing static field or method or if target
object access rights will be checked later target, int the member's access modifiers modifiers)Ensures that access to a method or field is granted and throws IllegalAccessException if not. |
| ReflectUtil | back to summary |
|---|---|
| private ReflectUtil() | |
| ensureMemberAccess | back to summary |
|---|---|
| public static void ensureMemberAccess(Class<?> currentClass, Class<?> memberClass, Object target, int modifiers) throws IllegalAccessException Ensures that access to a method or field is granted and throws IllegalAccessException if not. This method is not suitable for checking access to constructors. Implementation Note Delegates directly to
| |