Android
java.security
public final class

java.security.AllPermission

java.lang.Object
java.security.Permission Serializable Guard
java.security.AllPermission

Subclass of Permission whose instances imply all other permissions. Granting this permission is equivalent to disabling security.

Summary

Public Constructors

            AllPermission(String name, String actions)
Constructs a new instance of this class.
            AllPermission()
Constructs a new instance of this class.

Public Methods

          boolean  equals(Object obj)
Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison.
          String  getActions()
Returns the actions associated with the receiver.
          int  hashCode()
Returns an integer hash code for the receiver.
          boolean  implies(Permission permission)
Indicates whether the argument permission is implied by the receiver.
          PermissionCollection  newPermissionCollection()
Returns a new PermissionCollection for holding permissions of this class.
Methods inherited from class java.security.Permission
Methods inherited from class java.lang.Object
Methods inherited from interface java.security.Guard

Details

Public Constructors

public AllPermission(String name, String actions)

Constructs a new instance of this class. 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 java.lang.String ignored.
actions java.lang.String ignored.

public AllPermission()

Constructs a new instance of this class.

Public Methods

public boolean equals(Object obj)

Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison. All AllPermissions are equal to each other.

Parameters

obj the object to compare with this object

Returns

  • true if the object is the same as this object false if it is different from this object

See Also

public String getActions()

Returns the actions associated with the receiver. Since AllPermission objects allow all actions, answer with the string "".

Returns

  • String the actions associated with the receiver.

public int hashCode()

Returns an integer hash code for the receiver. Any two objects which answer true when passed to equals must answer the same value for this method.

Returns

  • the receiver's hash

See Also

public boolean implies(Permission permission)

Indicates whether the argument permission is implied by the receiver. AllPermission objects imply all other permissions.

Parameters

permission java.security.Permission the permission to check

Returns

  • boolean true if the argument permission is implied by the receiver, and false if it is not.

public PermissionCollection newPermissionCollection()

Returns a new PermissionCollection for holding permissions of this class. Answer null if any permission collection can be used.

Returns

  • a new PermissionCollection or null

See Also

  • BasicPermissionCollection
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:48