java.security

Class UnresolvedPermission

public final class UnresolvedPermission extends Permission

This class is used to hold instances of all permissions that cannot be resolved to available permission classes when the security Policy object is instantiated. This may happen when the necessary security class has not yet been downloaded from the network.

Instances of this class are re-resolved when AccessController check is done. At that time, a scan is made of all existing UnresolvedPermission objects and they are converted to objects of the appropriate permission type if the class for that type is then available.

Since: 1.1

See Also: Permission Permissions PermissionCollection Policy

UNKNOWN: updated to 1.4

Constructor Summary
UnresolvedPermission(String type, String name, String actions, Certificate[] certs)
Create a new instance with all the information necessary to resolve it to an instance of the proper class at a future time.
Method Summary
booleanequals(Object obj)
This method tests this permission for equality against the specified Object.
StringgetActions()
This method returns the list of actions associated with this permission.
StringgetUnresolvedActions()
Return the actions of the unresolved permission, or null if there are no actions.
Certificate[]getUnresolvedCerts()
Return the certificates of the unresolved permission.
StringgetUnresolvedName()
Return the name of the unresolved permission.
StringgetUnresolvedType()
Return the name of the class of the unresolved permission.
inthashCode()
Returns a hash code value for this object.
booleanimplies(Permission perm)
This method returns false always to indicate that this permission does not imply the specified permission.
PermissionCollectionnewPermissionCollection()
This class returns a PermissionCollection object that can be used to store instances of UnresolvedPermission.
StringtoString()
This method returns a String representation of this class.

Constructor Detail

UnresolvedPermission

public UnresolvedPermission(String type, String name, String actions, Certificate[] certs)
Create a new instance with all the information necessary to resolve it to an instance of the proper class at a future time.

Parameters: type the fully-qualified name of the class of this permission name the name of this permission actions the action list for this permission certs the list of certificates that sign this permission

Method Detail

equals

public boolean equals(Object obj)
This method tests this permission for equality against the specified Object. This will be true if and only if the following conditions are met:

Parameters: obj the Object to test for equality

Returns: true if the specified object is equal to this one

getActions

public String getActions()
This method returns the list of actions associated with this permission.

Returns: the action list

getUnresolvedActions

public String getUnresolvedActions()
Return the actions of the unresolved permission, or null if there are no actions.

Since: 1.5

getUnresolvedCerts

public Certificate[] getUnresolvedCerts()
Return the certificates of the unresolved permission. If there are no certificates, null is returned. Otherwise, a new array is returned.

Since: 1.5

getUnresolvedName

public String getUnresolvedName()
Return the name of the unresolved permission.

Since: 1.5

getUnresolvedType

public String getUnresolvedType()
Return the name of the class of the unresolved permission.

Since: 1.5

hashCode

public int hashCode()
Returns a hash code value for this object. Following the lead of Permission, this returns the hashcode of the permission name.

Returns: A hash value

implies

public boolean implies(Permission perm)
This method returns false always to indicate that this permission does not imply the specified permission. An UnresolvedPermission never grants any permissions.

Parameters: perm the Permission object to test

Returns: false; until a permission is resolved, it implies nothing

newPermissionCollection

public PermissionCollection newPermissionCollection()
This class returns a PermissionCollection object that can be used to store instances of UnresolvedPermission.

Returns: a new PermissionCollection

toString

public String toString()
This method returns a String representation of this class. The format is: '(unresolved "ClassName "name" "actions")'

Returns: String representation of this object