public final class

AllPermission

extends Permission
java.lang.Object
   ↳ java.security.Permission
     ↳ java.security.AllPermission

Class Overview

AllPermission represents the permission to perform any operation. Since its implies(Permission) method always returns true, granting this permission is equivalent to disabling security.

Summary

Public Constructors
AllPermission(String name, String actions)
Constructs a new instance of AllPermission.
AllPermission()
Constructs a new instance of AllPermission.
Public Methods
boolean equals(Object obj)
Compares the specified object with this AllPermission for equality and returns true if the specified object is equal, false otherwise.
String getActions()
Returns the actions associated with this AllPermission.
int hashCode()
Returns the hash code value for this AllPermission.
boolean implies(Permission permission)
Indicates whether the given permission is implied by this permission.
PermissionCollection newPermissionCollection()
Returns a new PermissionCollection for holding permissions of this class.
[Expand]
Inherited Methods
From class java.security.Permission
From class java.lang.Object
From interface java.security.Guard

Public Constructors

public AllPermission (String name, String actions)

Since: API Level 1

Constructs a new instance of AllPermission. The two argument version is provided for class Policy so that it has a consistent call pattern across all permissions. The name and action list are both ignored.

Parameters
name ignored.
actions ignored.

public AllPermission ()

Since: API Level 1

Constructs a new instance of AllPermission.

Public Methods

public boolean equals (Object obj)

Since: API Level 1

Compares the specified object with this AllPermission for equality and returns true if the specified object is equal, false otherwise. To be equal, the given object needs to be an instance of AllPermission.

Parameters
obj object to be compared for equality with this AllPermission.
Returns
  • true if the specified object is equal to this AllPermission, otherwise false.
See Also

public String getActions ()

Since: API Level 1

Returns the actions associated with this AllPermission. Since AllPermission objects allow all actions, this method returns always the string "<all actions>".

Returns
  • the actions associated with this AllPermission.

public int hashCode ()

Since: API Level 1

Returns the hash code value for this AllPermission. Returns the same hash code for AllPermissions that are equal to each other as required by the general contract of hashCode().

Returns
  • the hash code value for this AllPermission.

public boolean implies (Permission permission)

Since: API Level 1

Indicates whether the given permission is implied by this permission. AllPermission objects imply all other permissions.

Parameters
permission the permission to check.
Returns
  • always true.

public PermissionCollection newPermissionCollection ()

Since: API Level 1

Returns a new PermissionCollection for holding permissions of this class.

Returns
  • a new PermissionCollection.