Class PreJava9ReflectionAccessor


  • final class PreJava9ReflectionAccessor
    extends ReflectionAccessor
    A basic implementation of ReflectionAccessor which is suitable for Java 8 and below.

    This implementation just calls setAccessible(true), which worked fine before Java 9.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void makeAccessible​(java.lang.reflect.AccessibleObject ao)
      Does the same as ao.setAccessible(true), but never throws InaccessibleObjectException
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PreJava9ReflectionAccessor

        PreJava9ReflectionAccessor()
    • Method Detail

      • makeAccessible

        public void makeAccessible​(java.lang.reflect.AccessibleObject ao)
        Does the same as ao.setAccessible(true), but never throws InaccessibleObjectException
        Specified by:
        makeAccessible in class ReflectionAccessor