< prev index next >

src/java.base/share/classes/java/security/AllPermission.java

Print this page




  34 /**
  35  * The AllPermission is a permission that implies all other permissions.
  36  * <p>
  37  * <b>Note:</b> Granting AllPermission should be done with extreme care,
  38  * as it implies all other permissions. Thus, it grants code the ability
  39  * to run with security
  40  * disabled.  Extreme caution should be taken before granting such
  41  * a permission to code.  This permission should be used only during testing,
  42  * or in extremely rare cases where an application or applet is
  43  * completely trusted and adding the necessary permissions to the policy
  44  * is prohibitively cumbersome.
  45  *
  46  * @see java.security.Permission
  47  * @see java.security.AccessController
  48  * @see java.security.Permissions
  49  * @see java.security.PermissionCollection
  50  * @see java.lang.SecurityManager
  51  *
  52  *
  53  * @author Roland Schemers

  54  *
  55  * @serial exclude
  56  */
  57 
  58 public final class AllPermission extends Permission {
  59 
  60     private static final long serialVersionUID = -2916474571451318075L;
  61 
  62     /**
  63      * Creates a new AllPermission object.
  64      */
  65     public AllPermission() {
  66         super("<all permissions>");
  67     }
  68 
  69 
  70     /**
  71      * Creates a new AllPermission object. This
  72      * constructor exists for use by the {@code Policy} object
  73      * to instantiate new Permission objects.




  34 /**
  35  * The AllPermission is a permission that implies all other permissions.
  36  * <p>
  37  * <b>Note:</b> Granting AllPermission should be done with extreme care,
  38  * as it implies all other permissions. Thus, it grants code the ability
  39  * to run with security
  40  * disabled.  Extreme caution should be taken before granting such
  41  * a permission to code.  This permission should be used only during testing,
  42  * or in extremely rare cases where an application or applet is
  43  * completely trusted and adding the necessary permissions to the policy
  44  * is prohibitively cumbersome.
  45  *
  46  * @see java.security.Permission
  47  * @see java.security.AccessController
  48  * @see java.security.Permissions
  49  * @see java.security.PermissionCollection
  50  * @see java.lang.SecurityManager
  51  *
  52  *
  53  * @author Roland Schemers
  54  * @since 1.2
  55  *
  56  * @serial exclude
  57  */
  58 
  59 public final class AllPermission extends Permission {
  60 
  61     private static final long serialVersionUID = -2916474571451318075L;
  62 
  63     /**
  64      * Creates a new AllPermission object.
  65      */
  66     public AllPermission() {
  67         super("<all permissions>");
  68     }
  69 
  70 
  71     /**
  72      * Creates a new AllPermission object. This
  73      * constructor exists for use by the {@code Policy} object
  74      * to instantiate new Permission objects.


< prev index next >