java.security
Class AllPermission

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.security.Permission sample code for java.security.Permission definition code for java.security.Permission 
      extended by java.security.AllPermission
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable , Guard sample code for java.security.Guard definition code for java.security.Guard

public final class AllPermission
extends Permission sample code for java.security.Permission definition code for java.security.Permission

The AllPermission is a permission that implies all other permissions.

Note: Granting AllPermission should be done with extreme care, as it implies all other permissions. Thus, it grants code the ability to run with security disabled. Extreme caution should be taken before granting such a permission to code. This permission should be used only during testing, or in extremely rare cases where an application or applet is completely trusted and adding the necessary permissions to the policy is prohibitively cumbersome.

See Also:
Permission sample code for java.security.Permission definition code for java.security.Permission , AccessController sample code for java.security.AccessController definition code for java.security.AccessController , Permissions sample code for java.security.Permissions definition code for java.security.Permissions , PermissionCollection sample code for java.security.PermissionCollection definition code for java.security.PermissionCollection , SecurityManager sample code for java.lang.SecurityManager definition code for java.lang.SecurityManager

Constructor Summary
AllPermission sample code for java.security.AllPermission.AllPermission() definition code for java.security.AllPermission.AllPermission() ()
          Creates a new AllPermission object.
AllPermission sample code for java.security.AllPermission.AllPermission(java.lang.String, java.lang.String) definition code for java.security.AllPermission.AllPermission(java.lang.String, java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  name, String sample code for java.lang.String definition code for java.lang.String  actions)
          Creates a new AllPermission object.
 
Method Summary
 boolean equals sample code for java.security.AllPermission.equals(java.lang.Object) definition code for java.security.AllPermission.equals(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  obj)
          Checks two AllPermission objects for equality.
 String sample code for java.lang.String definition code for java.lang.String getActions sample code for java.security.AllPermission.getActions() definition code for java.security.AllPermission.getActions() ()
          Returns the canonical string representation of the actions.
 int hashCode sample code for java.security.AllPermission.hashCode() definition code for java.security.AllPermission.hashCode() ()
          Returns the hash code value for this object.
 boolean implies sample code for java.security.AllPermission.implies(java.security.Permission) definition code for java.security.AllPermission.implies(java.security.Permission) (Permission sample code for java.security.Permission definition code for java.security.Permission  p)
          Checks if the specified permission is "implied" by this object.
 PermissionCollection sample code for java.security.PermissionCollection definition code for java.security.PermissionCollection newPermissionCollection sample code for java.security.AllPermission.newPermissionCollection() definition code for java.security.AllPermission.newPermissionCollection() ()
          Returns a new PermissionCollection object for storing AllPermission objects.
 
Methods inherited from class java.security.Permission sample code for java.security.Permission definition code for java.security.Permission
checkGuard sample code for java.security.Permission.checkGuard(java.lang.Object) definition code for java.security.Permission.checkGuard(java.lang.Object) , getName sample code for java.security.Permission.getName() definition code for java.security.Permission.getName() , toString sample code for java.security.Permission.toString() definition code for java.security.Permission.toString()
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

AllPermission sample code for java.security.AllPermission() definition code for java.security.AllPermission()

public AllPermission()
Creates a new AllPermission object.


AllPermission sample code for java.security.AllPermission(java.lang.String, java.lang.String) definition code for java.security.AllPermission(java.lang.String, java.lang.String)

public AllPermission(String sample code for java.lang.String definition code for java.lang.String  name,
                     String sample code for java.lang.String definition code for java.lang.String  actions)
Creates a new AllPermission object. This constructor exists for use by the Policy object to instantiate new Permission objects.

Parameters:
name - ignored
actions - ignored.
Method Detail

implies sample code for java.security.AllPermission.implies(java.security.Permission) definition code for java.security.AllPermission.implies(java.security.Permission)

public boolean implies(Permission sample code for java.security.Permission definition code for java.security.Permission  p)
Checks if the specified permission is "implied" by this object. This method always returns true.

Specified by:
implies sample code for java.security.Permission.implies(java.security.Permission) definition code for java.security.Permission.implies(java.security.Permission) in class Permission sample code for java.security.Permission definition code for java.security.Permission
Parameters:
p - the permission to check against.
Returns:
return

equals sample code for java.security.AllPermission.equals(java.lang.Object) definition code for java.security.AllPermission.equals(java.lang.Object)

public boolean equals(Object sample code for java.lang.Object definition code for java.lang.Object  obj)
Checks two AllPermission objects for equality. Two AllPermission objects are always equal.

Specified by:
equals sample code for java.security.Permission.equals(java.lang.Object) definition code for java.security.Permission.equals(java.lang.Object) in class Permission sample code for java.security.Permission definition code for java.security.Permission
Parameters:
obj - the object we are testing for equality with this object.
Returns:
true if obj is an AllPermission, false otherwise.
See Also:
Object.hashCode() sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable

hashCode sample code for java.security.AllPermission.hashCode() definition code for java.security.AllPermission.hashCode()

public int hashCode()
Returns the hash code value for this object.

Specified by:
hashCode sample code for java.security.Permission.hashCode() definition code for java.security.Permission.hashCode() in class Permission sample code for java.security.Permission definition code for java.security.Permission
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object) sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable

getActions sample code for java.security.AllPermission.getActions() definition code for java.security.AllPermission.getActions()

public String sample code for java.lang.String definition code for java.lang.String  getActions()
Returns the canonical string representation of the actions.

Specified by:
getActions sample code for java.security.Permission.getActions() definition code for java.security.Permission.getActions() in class Permission sample code for java.security.Permission definition code for java.security.Permission
Returns:
the actions.

newPermissionCollection sample code for java.security.AllPermission.newPermissionCollection() definition code for java.security.AllPermission.newPermissionCollection()

public PermissionCollection sample code for java.security.PermissionCollection definition code for java.security.PermissionCollection  newPermissionCollection()
Returns a new PermissionCollection object for storing AllPermission objects.

Overrides:
newPermissionCollection sample code for java.security.Permission.newPermissionCollection() definition code for java.security.Permission.newPermissionCollection() in class Permission sample code for java.security.Permission definition code for java.security.Permission
Returns:
a new PermissionCollection object suitable for storing AllPermissions.