Top Description Fields Constructors Methods
java.security

pack-priv final Class AllPermissionCollection

Located in compilation unit of java.security.AllPermission.

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

An AllPermissionCollection stores a collection of AllPermission permissions. AllPermission objects must be stored in a manner that allows them to be inserted in any order, but enable the implies function to evaluate the implies method in an efficient (and consistent) manner.
Author
Roland Schemers
See Also
java.security.Permission, java.security.Permissions

Field Summary

Modifier and TypeField and Description
private boolean
all_allowed

True if any AllPermissionCollection objects have been added.

private static final long

Constructor Summary

AccessConstructor and Description
public
AllPermissionCollection()

Create an empty AllPermissionCollection 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 AllPermissionCollection object.

public Enumeration<Permission>

Returns:

an enumeration of all the AllPermission objects.
elements
()

Implements abstract java.security.PermissionCollection.elements.

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

public boolean

Returns:

always returns true.
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".

Inherited from java.security.PermissionCollection:
elementsAsStreamisReadOnlysetReadOnlytoString

Field Detail

all_allowedback to summary
private boolean all_allowed

True if any AllPermissionCollection objects have been added.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.security.PermissionCollection.serialVersionUID.

Annotations
@Serial

Constructor Detail

AllPermissionCollectionback to summary
public AllPermissionCollection()

Create an empty AllPermissionCollection object.

Method Detail

addback to summary
public void add(Permission permission)

Implements abstract java.security.PermissionCollection.add.

Adds a permission to the AllPermissionCollection object. The key for the hash is permission.path.

Parameters
permission:Permission

the Permission object to add.

Exceptions
IllegalArgumentException:
if the permission is not an AllPermission
SecurityException:
if this AllPermissionCollection object has been marked readonly
elementsback to summary
public Enumeration<Permission> elements()

Implements abstract java.security.PermissionCollection.elements.

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

Returns:Enumeration<Permission>

an enumeration of all the AllPermission objects.

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

always returns true.