java.util
Class PropertyPermissionCollection

java.lang.Object
  extended byjava.security.PermissionCollection
      extended byjava.util.PropertyPermissionCollection
All Implemented Interfaces:
Serializable

final class PropertyPermissionCollection
extends java.security.PermissionCollection
implements Serializable

A PropertyPermissionCollection stores a set of PropertyPermission permissions.

Author:
Roland Schemers
See Also:
Permission, Permissions, PermissionCollection, Serialized Form

Field Summary
private  boolean all_allowed
          Boolean saying if "*" is in the collection.
private  Map perms
          Key is property name; value is PropertyPermission.
private static ObjectStreamField[] serialPersistentFields
           
private static long serialVersionUID
           
 
Fields inherited from class java.security.PermissionCollection
 
Constructor Summary
PropertyPermissionCollection()
          Create an empty PropertyPermissions object.
 
Method Summary
 void add(java.security.Permission permission)
          Adds a permission to the PropertyPermissions.
 Enumeration elements()
          Returns an enumeration of all the PropertyPermission objects in the container.
 boolean implies(java.security.Permission permission)
          Check and see if this set of permissions implies the permissions expressed in "permission".
private  void readObject(ObjectInputStream in)
           
private  void writeObject(ObjectOutputStream out)
           
 
Methods inherited from class java.security.PermissionCollection
isReadOnly, setReadOnly, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

perms

private transient Map perms
Key is property name; value is PropertyPermission. Not serialized; see serialization section at end of class.


all_allowed

private boolean all_allowed
Boolean saying if "*" is in the collection.

See Also:
serialPersistentFields

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

serialPersistentFields

private static final ObjectStreamField[] serialPersistentFields
Constructor Detail

PropertyPermissionCollection

public PropertyPermissionCollection()
Create an empty PropertyPermissions object.

Method Detail

add

public void add(java.security.Permission permission)
Adds a permission to the PropertyPermissions. The key for the hash is the name.

Parameters:
permission - the Permission object to add.
Throws:
IllegalArgumentException - - if the permission is not a PropertyPermission
SecurityException - - if this PropertyPermissionCollection object has been marked readonly

implies

public boolean implies(java.security.Permission permission)
Check and see if this set of permissions implies the permissions expressed in "permission".

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

elements

public Enumeration elements()
Returns an enumeration of all the PropertyPermission objects in the container.

Returns:
an enumeration of all the PropertyPermission objects.

writeObject

private void writeObject(ObjectOutputStream out)
                  throws IOException
Throws:
IOException

readObject

private void readObject(ObjectInputStream in)
                 throws IOException,
                        ClassNotFoundException
Throws:
IOException
ClassNotFoundException