APIdia Launch Partner
Top Description Fields Constructors Methods
java.security

pack-priv final Class PermissionsHash

Located in compilation unit of java.security.Permissions.

extends PermissionCollection
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable

A PermissionsHash stores a homogeneous set of permissions in a hashtable.
Author
Roland Schemers
See Also
Permission, Permissions

Field Summary

Modifier and TypeField and Description
private transient ConcurrentHashMap<Permission, Permission>
permsMap

Key and value are (same) permissions objects.

private static final ObjectStreamField[]
private static final long

Constructor Summary

AccessConstructor and Description
pack-priv
PermissionsHash()

Create an empty PermissionsHash 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 the PermissionsHash.

public Enumeration<Permission>

Returns:

an enumeration of all the Permission objects.
elements
()

Implements abstract java.security.PermissionCollection.elements.

Returns an enumeration of all the Permission objects in the container.

public boolean

Returns:

true if "permission" is a proper subset of a permission in the set, false if not.
implies
(Permission
the Permission object to compare
permission
)

Implements abstract java.security.PermissionCollection.implies.

Check and see if this set of permissions implies the permissions expressed in "permission".

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

Reads in a Hashtable of Permission/Permission and saves them in the permsMap field.

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

Writes the contents of the permsMap field out as a Hashtable for serialization compatibility with earlier releases.

Inherited from java.security.PermissionCollection:
elementsAsStreamisReadOnlysetReadOnlytoString

Field Detail

permsMapback to summary
private transient ConcurrentHashMap<Permission, Permission> permsMap

Key and value are (same) permissions objects. Not serialized; see serialization section at end of class.

serialPersistentFieldsback to summary
private static final ObjectStreamField[] serialPersistentFields
Annotations
@Serial
Serial Fields:
perms:Hashtable
A table of the permissions (both key and value are same).
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.security.PermissionCollection.serialVersionUID.

Annotations
@Serial

Constructor Detail

PermissionsHashback to summary
pack-priv PermissionsHash()

Create an empty PermissionsHash object.

Method Detail

addback to summary
public void add(Permission permission)

Implements abstract java.security.PermissionCollection.add.

Adds a permission to the PermissionsHash.

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 Permission objects in the container.

Returns:Enumeration<Permission>

an enumeration of all the Permission objects.

Annotations
@Override
impliesback to summary
public boolean implies(Permission permission)

Implements abstract java.security.PermissionCollection.implies.

Check and see if this set of permissions implies the permissions expressed in "permission".

Parameters
permission:Permission

the Permission object to compare

Returns:boolean

true if "permission" is a proper subset of a permission in the set, false if not.

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

Reads in a Hashtable of Permission/Permission and saves them in the permsMap 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 permsMap field out as a Hashtable 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