Top Description Fields Constructors Methods
java.security

pack-priv final Class UnresolvedPermissionCollection

extends PermissionCollection
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
java.io.IOException, .ObjectInputStream, .ObjectOutputStream, .ObjectStreamField, java.util.*, java.util.concurrent.ConcurrentHashMap, .CopyOnWriteArrayList

A UnresolvedPermissionCollection stores a collection of UnresolvedPermission permissions.
Author
Roland Schemers
Since
1.2
See Also
java.security.Permission, java.security.Permissions, java.security.UnresolvedPermission

Field Summary

Modifier and TypeField and Description
private transient ConcurrentHashMap<String, List<UnresolvedPermission>>
perms

Key is permission type, value is a list of the UnresolvedPermissions of the same type.

private static final ObjectStreamField[]
private static final long

Constructor Summary

AccessConstructor and Description
public
UnresolvedPermissionCollection()

Create an empty UnresolvedPermissionCollection object.

Method Summary

Modifier and TypeMethod and Description
public void
add(Permission
the Permission object to add.
permission
)

Implements abstract java.security.PermissionCollection.add.

Adds a permission to this UnresolvedPermissionCollection.

public Enumeration<Permission>

Returns:

an enumeration of all the UnresolvedPermission objects.
elements
()

Implements abstract java.security.PermissionCollection.elements.

Returns an enumeration of all the UnresolvedPermission lists in the container.

pack-priv List<UnresolvedPermission>
getUnresolvedPermissions(Permission p)

get any unresolved permissions of the same type as p, and return the List containing them.

public boolean
implies(Permission
the Permission object to compare.
permission
)

Implements abstract java.security.PermissionCollection.implies.

always returns false for unresolved permissions

private void
readObject(ObjectInputStream
the ObjectInputStream from which data is read
in
)

Reads in a Hashtable in which the values are Vectors of UnresolvedPermissions and saves them in the perms field.

private void
writeObject(ObjectOutputStream
the ObjectOutputStream to which data is written
out
)

Writes the contents of the perms field out as a Hashtable in which the values are Vectors for serialization compatibility with earlier releases.

Inherited from java.security.PermissionCollection:
elementsAsStreamisReadOnlysetReadOnlytoString

Field Detail

permsback to summary
private transient ConcurrentHashMap<String, List<UnresolvedPermission>> perms

Key is permission type, value is a list of the UnresolvedPermissions of the same type. Not serialized; see serialization section at end of class.

serialPersistentFieldsback to summary
private static final ObjectStreamField[] serialPersistentFields
Annotations
@Serial
Serial Fields:
permissions:Hashtable
A table of the UnresolvedPermissions keyed on type, value is Vector of permissions
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.security.PermissionCollection.serialVersionUID.

Annotations
@Serial

Constructor Detail

UnresolvedPermissionCollectionback to summary
public UnresolvedPermissionCollection()

Create an empty UnresolvedPermissionCollection object.

Method Detail

addback to summary
public void add(Permission permission)

Implements abstract java.security.PermissionCollection.add.

Adds a permission to this UnresolvedPermissionCollection. The key for the hash is the unresolved permission's type (class) name.

Parameters
permission:Permission

the Permission object to add.

Annotations
@Override
elementsback to summary
public Enumeration<Permission> elements()

Implements abstract java.security.PermissionCollection.elements.

Returns an enumeration of all the UnresolvedPermission lists in the container.

Returns:Enumeration<Permission>

an enumeration of all the UnresolvedPermission objects.

Annotations
@Override
getUnresolvedPermissionsback to summary
pack-priv List<UnresolvedPermission> getUnresolvedPermissions(Permission p)

get any unresolved permissions of the same type as p, and return the List containing them.

impliesback to summary
public boolean implies(Permission permission)

Implements abstract java.security.PermissionCollection.implies.

always returns false for unresolved permissions

Parameters
permission:Permission

Doc from java.security.PermissionCollection.implies.

the Permission object to compare.

Returns:boolean

Doc from java.security.PermissionCollection.implies.

true if "permission" is implied by the permissions in the collection, false if not.

Annotations
@Override
readObjectback to summary
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException

Reads in a Hashtable in which the values are Vectors of UnresolvedPermissions and saves them in the perms field.

Parameters
in:ObjectInputStream

the ObjectInputStream from which data is read

Annotations
@Serial
Exceptions
IOException:
if an I/O error occurs
ClassNotFoundException:
if a serialized class cannot be loaded
writeObjectback to summary
private void writeObject(ObjectOutputStream out) throws IOException

Writes the contents of the perms field out as a Hashtable in which the values are Vectors for serialization compatibility with earlier releases.

Parameters
out:ObjectOutputStream

the ObjectOutputStream to which data is written

Annotations
@Serial
Exceptions
IOException:
if an I/O error occurs