Class FieldEnablerPrivilegedAction

  • All Implemented Interfaces:

    public class FieldEnablerPrivilegedAction
    extends Object
    implements PrivilegedAction<Object>
    Helper class to make a field accessible. Directly calling field.setAccessible(true); is not advised as it could be invoked in a context without security permissions. For more information please check API in JavaSE. Usage example: AccessController.doPrivileged(new FieldEnablerPrivilegedAction(field));
    Attila Kiraly
    • Constructor Detail

      • FieldEnablerPrivilegedAction

        public FieldEnablerPrivilegedAction​(Field field)