Top Description Fields Constructors Methods
java.security

public final Class AllPermission

Additional top-level class in compilation unit: AllPermissionCollection.

extends Permission
Class Inheritance
Imports
sun.security.util.SecurityConstants, java.util.Enumeration

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.

Author
Roland Schemers
Since
1.2
See Also
java.security.Permission, java.security.AccessController, java.security.Permissions, java.security.PermissionCollection, java.lang.SecurityManager

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public
AllPermission()

Creates a new AllPermission object.

public
AllPermission(String
ignored
name
,
String
ignored.
actions
)

Creates a new AllPermission object.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if obj is an AllPermission, false otherwise.
equals
(Object
the object we are testing for equality with this object.
obj
)

Implements abstract java.security.Permission.equals.

Checks two AllPermission objects for equality.

public String

Returns:

the actions.
getActions
()

Implements abstract java.security.Permission.getActions.

Returns the canonical string representation of the actions.

public int

Returns:

the hash code value for this object
hashCode
()

Implements abstract java.security.Permission.hashCode.

Returns the hash code value for this object.

public boolean

Returns:

return
implies
(Permission
the permission to check against.
p
)

Implements abstract java.security.Permission.implies.

Checks if the specified permission is "implied" by this object.

public PermissionCollection

Returns:

a new PermissionCollection suitable for storing AllPermission objects.
newPermissionCollection
()

Overrides java.security.Permission.newPermissionCollection.

Returns a new PermissionCollection for storing AllPermission objects.

Inherited from java.security.Permission:
checkGuardgetNametoString

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.security.Permission.serialVersionUID.

Annotations
@Serial

Constructor Detail

AllPermissionback to summary
public AllPermission()

Creates a new AllPermission object.

AllPermissionback to summary
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.

Parameters
name:String

ignored

actions:String

ignored.

Method Detail

equalsback to summary
public boolean equals(Object obj)

Implements abstract java.security.Permission.equals.

Checks two AllPermission objects for equality. Two AllPermission objects are always equal.

Parameters
obj:Object

the object we are testing for equality with this object.

Returns:boolean

true if obj is an AllPermission, false otherwise.

Annotations
@Override
getActionsback to summary
public String getActions()

Implements abstract java.security.Permission.getActions.

Returns the canonical string representation of the actions.

Returns:String

the actions.

hashCodeback to summary
public int hashCode()

Implements abstract java.security.Permission.hashCode.

Returns the hash code value for this object.

Returns:int

the hash code value for this object

Annotations
@Override
impliesback to summary
public boolean implies(Permission p)

Implements abstract java.security.Permission.implies.

Checks if the specified permission is "implied" by this object. This method always returns true.

Parameters
p:Permission

the permission to check against.

Returns:boolean

return

newPermissionCollectionback to summary
public PermissionCollection newPermissionCollection()

Overrides java.security.Permission.newPermissionCollection.

Returns a new PermissionCollection for storing AllPermission objects.

Returns:PermissionCollection

a new PermissionCollection suitable for storing AllPermission objects.