Interface AccessEnabler

  • All Known Implementing Classes:
    DefaultAccessEnabler, JigsawAccessEnabler

    public interface AccessEnabler
    interface encapsulating behaviour required both to check for the need to access a member reflectively and to ensure that the member can be so used.
    • Method Detail

      • requiresAccess

        boolean requiresAccess​(java.lang.Class<?> klazz)
        test whether reference to the class from a classpath class requires the use of reflection or a method handle and possibly also module jiggery-pokery.
        Parameters:
        klazz - the clas to be checked
        Returns:
        true if reference to the class from a classpath class requires the use of reflection or a method handle and possibly module jiggery-pokery otherwise false.
      • requiresAccess

        boolean requiresAccess​(java.lang.reflect.AccessibleObject accessible)
        test whether access to the accessible from a classpath class requires the use of reflection or a method handle and possibly also module jiggery-pokery.
        Parameters:
        accessible - this must be a Member
        Returns:
        true if access requires reflection or a method handle and possibly also module jiggery-pokery otherwise false.
      • ensureAccess

        void ensureAccess​(java.lang.reflect.AccessibleObject accessible)
        ensure that accessible can be accessed using reflection or a method handle
        Parameters:
        accessible - this must be a Member