public final class

UnresolvedPermission

extends Permission
implements Serializable
java.lang.Object
   ↳ java.security.Permission
     ↳ java.security.UnresolvedPermission

Class Overview

An UnresolvedPermission represents a Permission whose type should be resolved lazy and not during initialization time of the Policy. UnresolvedPermissions contain all information to be replaced by a concrete typed Permission right before the access checks are performed.

Summary

Public Constructors
UnresolvedPermission(String type, String name, String actions, Certificate[] certs)
Constructs a new instance of UnresolvedPermission.
Public Methods
boolean equals(Object obj)
Compares the specified object with this UnresolvedPermission for equality and returns true if the specified object is equal, false otherwise.
String getActions()
Returns an empty string since there are no actions allowed for UnresolvedPermission.
String getUnresolvedActions()
Returns the actions of the permission this UnresolvedPermission is resolved to.
Certificate[] getUnresolvedCerts()
Returns the certificates of the permission this UnresolvedPermission is resolved to.
String getUnresolvedName()
Returns the name of the permission this UnresolvedPermission is resolved to.
String getUnresolvedType()
Returns the fully qualified class name of the permission this UnresolvedPermission is resolved to.
int hashCode()
Returns the hash code value for this UnresolvedPermission.
boolean implies(Permission permission)
Indicates whether the specified permission is implied by this UnresolvedPermission.
PermissionCollection newPermissionCollection()
Returns a new PermissionCollection for holding UnresolvedPermission objects.
String toString()
Returns a string containing a concise, human-readable description of this UnresolvedPermission including its target name and its target actions.
[Expand]
Inherited Methods
From class java.security.Permission
From class java.lang.Object
From interface java.security.Guard

Public Constructors

public UnresolvedPermission (String type, String name, String actions, Certificate[] certs)

Since: API Level 1

Constructs a new instance of UnresolvedPermission. The supplied parameters are used when this instance is resolved to the concrete Permission.

Parameters
type the fully qualified class name of the permission this class is resolved to.
name the name of the permission this class is resolved to, maybe null.
actions the actions of the permission this class is resolved to, maybe null.
certs the certificates of the permission this class is resolved to, maybe null.
Throws
NullPointerException if type is null.

Public Methods

public boolean equals (Object obj)

Since: API Level 1

Compares the specified object with this UnresolvedPermission for equality and returns true if the specified object is equal, false otherwise. To be equal, the specified object needs to be an instance of UnresolvedPermission, the two UnresolvedPermissions must refer to the same type and must have the same name, the same actions and certificates.

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

public String getActions ()

Since: API Level 1

Returns an empty string since there are no actions allowed for UnresolvedPermission. The actions, specified in the constructor, are used when the concrete permission is resolved and created.

Returns
  • an empty string, indicating that there are no actions.

public String getUnresolvedActions ()

Since: API Level 1

Returns the actions of the permission this UnresolvedPermission is resolved to.

Returns
  • the actions of the permission this UnresolvedPermission is resolved to.

public Certificate[] getUnresolvedCerts ()

Since: API Level 1

Returns the certificates of the permission this UnresolvedPermission is resolved to.

Returns
  • the certificates of the permission this UnresolvedPermission is resolved to.

public String getUnresolvedName ()

Since: API Level 1

Returns the name of the permission this UnresolvedPermission is resolved to.

Returns
  • the name of the permission this UnresolvedPermission is resolved to.

public String getUnresolvedType ()

Since: API Level 1

Returns the fully qualified class name of the permission this UnresolvedPermission is resolved to.

Returns
  • the fully qualified class name of the permission this UnresolvedPermission is resolved to.

public int hashCode ()

Since: API Level 1

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

Returns
  • the hash code value for this UnresolvedPermission.

public boolean implies (Permission permission)

Since: API Level 1

Indicates whether the specified permission is implied by this UnresolvedPermission. UnresolvedPermission objects imply nothing since nothing is known about them yet.

Before actual implication checking, this method tries to resolve UnresolvedPermissions (if any) against the passed instance. Successfully resolved permissions (if any) are taken into account during further processing.

Parameters
permission the permission to check.
Returns
  • always false

public PermissionCollection newPermissionCollection ()

Since: API Level 1

Returns a new PermissionCollection for holding UnresolvedPermission objects.

Returns
  • a new PermissionCollection for holding UnresolvedPermission objects.

public String toString ()

Since: API Level 1

Returns a string containing a concise, human-readable description of this UnresolvedPermission including its target name and its target actions.

Returns
  • a printable representation for this UnresolvedPermission.