Class Accessibles


  • public final class Accessibles
    extends java.lang.Object
    Understands utility methods related to AccessibleObjects.
    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 the accessible flag of the given AccessibleObject to true.
      static void setAccessible​(java.lang.reflect.AccessibleObject o, boolean accessible)
      Sets the accessible flag of the given AccessibleObject to the given boolean value.
      static void setAccessibleIgnoringExceptions​(java.lang.reflect.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​(java.lang.reflect.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​(java.lang.reflect.AccessibleObject o)
        Sets the accessible flag of the given AccessibleObject to true.
        Parameters:
        o - the given AccessibleObject.
        Throws:
        java.lang.SecurityException - if the request is denied.
      • setAccessible

        public static void setAccessible​(java.lang.reflect.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:
        java.lang.SecurityException - if the request is denied.