java.security

Class AllPermission

public final class AllPermission extends Permission

This class is a permission that implies all other permissions. Granting this permission effectively grants all others. Extreme caution should be exercised in granting this permission.

Since: 1.1

See Also: AccessController Permissions SecurityManager

UNKNOWN: updated to 1.4

Constructor Summary
AllPermission()
Create a new AllPermission object.
AllPermission(String name, String actions)
Create a new AllPermission object.
Method Summary
booleanequals(Object obj)
Checks an object for equality.
StringgetActions()
This method returns the list of actions associated with this object.
inthashCode()
This method returns a hash code for this object.
booleanimplies(Permission perm)
This method always returns true to indicate that this permission always implies that any other permission is also granted.
PermissionCollectionnewPermissionCollection()
Returns a PermissionCollection which can hold AllPermission.

Constructor Detail

AllPermission

public AllPermission()
Create a new AllPermission object.

AllPermission

public AllPermission(String name, String actions)
Create a new AllPermission object. The parameters are ignored, as all permission implies ALL PERMISSION.

Parameters: name ignored actions ignored

Method Detail

equals

public boolean equals(Object obj)
Checks an object for equality. All AllPermissions are equal.

Parameters: obj the Object to test for equality

getActions

public String getActions()
This method returns the list of actions associated with this object. This will always be the empty string ("") for this class.

Returns: the action list

hashCode

public int hashCode()
This method returns a hash code for this object. This returns 1.

Returns: a hash value for this object

implies

public boolean implies(Permission perm)
This method always returns true to indicate that this permission always implies that any other permission is also granted.

Parameters: perm ignored

Returns: true, the permission is implied

newPermissionCollection

public PermissionCollection newPermissionCollection()
Returns a PermissionCollection which can hold AllPermission.

Returns: a permission collection