Package org.fest.reflect.util
Class Accessibles
- java.lang.Object
-
- org.fest.reflect.util.Accessibles
-
public final class Accessibles extends java.lang.ObjectUnderstands utility methods related tos.AccessibleObject- Author:
- Alex Ruiz
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidmakeAccessible(java.lang.reflect.AccessibleObject o)Sets theaccessibleflag of the giventoAccessibleObjecttrue.static voidsetAccessible(java.lang.reflect.AccessibleObject o, boolean accessible)Sets theaccessibleflag of the givento the givenAccessibleObjectbooleanvalue.static voidsetAccessibleIgnoringExceptions(java.lang.reflect.AccessibleObject o, boolean accessible)Sets theaccessibleflag of the givento the givenAccessibleObjectbooleanvalue, ignoring any thrown exception.
-
-
-
Method Detail
-
setAccessibleIgnoringExceptions
public static void setAccessibleIgnoringExceptions(java.lang.reflect.AccessibleObject o, boolean accessible)Sets theaccessibleflag of the givento the givenAccessibleObjectbooleanvalue, ignoring any thrown exception.- Parameters:
o- the givenAccessibleObject.accessible- the value to set theaccessibleflag to.
-
makeAccessible
public static void makeAccessible(java.lang.reflect.AccessibleObject o)
Sets theaccessibleflag of the giventoAccessibleObjecttrue.- Parameters:
o- the givenAccessibleObject.- Throws:
java.lang.SecurityException- if the request is denied.
-
setAccessible
public static void setAccessible(java.lang.reflect.AccessibleObject o, boolean accessible)Sets theaccessibleflag of the givento the givenAccessibleObjectbooleanvalue.- Parameters:
o- the givenAccessibleObject.accessible- the value to set theaccessibleflag to.- Throws:
java.lang.SecurityException- if the request is denied.
-
-