FileDocCategorySizeDatePackage
AllPermission.javaAPI DocJava SE 5 API5648Fri Aug 26 14:57:14 BST 2005java.security

AllPermission

public final class AllPermission extends 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
java.security.Permission
see
java.security.AccessController
see
java.security.Permissions
see
java.security.PermissionCollection
see
java.lang.SecurityManager
version
1.20 03/12/19
author
Roland Schemers
serial
exclude

Fields Summary
private static final long
serialVersionUID
Constructors Summary
public AllPermission()
Creates a new AllPermission object.


              

     
    
	super("<all permissions>");
    
public AllPermission(String name, String actions)
Creates a new AllPermission object. This constructor exists for use by the Policy object to instantiate new Permission objects.

param
name ignored
param
actions ignored.

	this();
    
Methods Summary
public booleanequals(java.lang.Object obj)
Checks two AllPermission objects for equality. Two AllPermission objects are always equal.

param
obj the object we are testing for equality with this object.
return
true if obj is an AllPermission, false otherwise.

	return (obj instanceof AllPermission);
    
public java.lang.StringgetActions()
Returns the canonical string representation of the actions.

return
the actions.

	return "<all actions>";
    
public inthashCode()
Returns the hash code value for this object.

return
a hash code value for this object.

	return 1;
    
public booleanimplies(java.security.Permission p)
Checks if the specified permission is "implied" by this object. This method always returns true.

param
p the permission to check against.
return
return

	 return true;
    
public java.security.PermissionCollectionnewPermissionCollection()
Returns a new PermissionCollection object for storing AllPermission objects.

return
a new PermissionCollection object suitable for storing AllPermissions.

	return new AllPermissionCollection();