org.fest.reflect.util
Class Accessibles

java.lang.Object
  extended by org.fest.reflect.util.Accessibles

public final class Accessibles
extends Object

Understands utility methods related to AccessibleObjects.

Author:
Alex Ruiz

Method Summary
static void makeAccessible(AccessibleObject o)
          Sets the accessible flag of the given AccessibleObject to true.
static void setAccessible(AccessibleObject o, boolean accessible)
          Sets the accessible flag of the given AccessibleObject to the given boolean value.
static void setAccessibleIgnoringExceptions(AccessibleObject o, boolean accessible)
          Sets the accessible flag of the given AccessibleObject to the given boolean value, ignoring any thrown exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setAccessibleIgnoringExceptions

public static void setAccessibleIgnoringExceptions(AccessibleObject o,
                                                   boolean accessible)
Sets the accessible flag of the given AccessibleObject to the given boolean value, ignoring any thrown exception.

Parameters:
o - the given AccessibleObject.
accessible - the value to set the accessible flag to.

makeAccessible

public static void makeAccessible(AccessibleObject o)
Sets the accessible flag of the given AccessibleObject to true.

Parameters:
o - the given AccessibleObject.
Throws:
SecurityException - if the request is denied.

setAccessible

public static void setAccessible(AccessibleObject o,
                                 boolean accessible)
Sets the accessible flag of the given AccessibleObject to the given boolean value.

Parameters:
o - the given AccessibleObject.
accessible - the value to set the accessible flag to.
Throws:
SecurityException - if the request is denied.


Copyright © 2007-2010 FEST (Fixtures for Easy Software Testing). All Rights Reserved.