Package org.fest.reflect.util
Class Accessibles
- java.lang.Object
-
- org.fest.reflect.util.Accessibles
-
public final class Accessibles extends java.lang.Object
Understands utility methods related to
s.AccessibleObject
- Author:
- Alex Ruiz
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
makeAccessible(java.lang.reflect.AccessibleObject o)
Sets theaccessible
flag of the given
toAccessibleObject
true
.static void
setAccessible(java.lang.reflect.AccessibleObject o, boolean accessible)
Sets theaccessible
flag of the given
to the givenAccessibleObject
boolean
value.static void
setAccessibleIgnoringExceptions(java.lang.reflect.AccessibleObject o, boolean accessible)
Sets theaccessible
flag of the given
to the givenAccessibleObject
boolean
value, ignoring any thrown exception.
-
-
-
Method Detail
-
setAccessibleIgnoringExceptions
public static void setAccessibleIgnoringExceptions(java.lang.reflect.AccessibleObject o, boolean accessible)
Sets theaccessible
flag of the given
to the givenAccessibleObject
boolean
value, ignoring any thrown exception.- Parameters:
o
- the givenAccessibleObject
.accessible
- the value to set theaccessible
flag to.
-
makeAccessible
public static void makeAccessible(java.lang.reflect.AccessibleObject o)
Sets theaccessible
flag of the given
toAccessibleObject
true
.- 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 theaccessible
flag of the given
to the givenAccessibleObject
boolean
value.- Parameters:
o
- the givenAccessibleObject
.accessible
- the value to set theaccessible
flag to.- Throws:
java.lang.SecurityException
- if the request is denied.
-
-