Located in compilation unit of java.
BasicPermissionCollection stores a collection
of BasicPermission permissions. BasicPermission 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.
A BasicPermissionCollection handles comparing a permission
like "a.b.c.d.e" with a Permission such as "a.b.*", or "*".
java.security.Permission , java.security.Permissions
| Modifier and Type | Field and Description |
|---|---|
| private boolean | all_allowed
This is set to |
| private Class | permClass
The class to which all |
| private transient ConcurrentHashMap | perms
Key is name, value is permission. |
| private static final ObjectStreamField[] | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | add(Permission
the permission)Permission object to add.Implements abstract java. Adds a permission to the |
| public Enumeration | Returns: an enumeration of all the BasicPermission objects.Implements abstract java. Returns an enumeration of all the BasicPermission objects in the container. |
| public boolean | Returns: true if "permission" is a proper subset of a
permission in the set, false if not.the Permission object to compare permission)Implements abstract java. Check and see if this set of permissions implies the permissions expressed in "permission". |
| private void | readObject(ObjectInputStream
the in)ObjectInputStream from which data is readreadObject is called to restore the state of the
|
| private void | writeObject(ObjectOutputStream
the out)ObjectOutputStream to which data is writtenWrites the contents of the perms field out as a Hashtable for serialization compatibility with earlier releases. |
| all_allowed | back to summary |
|---|---|
| private boolean all_allowed This is set to
| |
| permClass | back to summary |
|---|---|
| private Class<?> permClass The class to which all
| |
| perms | back to summary |
|---|---|
| private transient ConcurrentHashMap<String, Permission> perms Key is name, value is permission. All permission objects in collection must be of the same type. Not serialized; see serialization section at end of class. | |
| serialPersistentFields | back to summary |
|---|---|
private static final ObjectStreamField[] serialPersistentFields
| |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides java. | |
| BasicPermissionCollection | back to summary |
|---|---|
| public BasicPermissionCollection(Class<?> clazz) Create an empty BasicPermissionCollection object. | |
| add | back to summary |
|---|---|
| public void add(Permission permission) Implements abstract java. Adds a permission to the
| |
| elements | back to summary |
|---|---|
| public Enumeration Implements abstract java. Returns an enumeration of all the BasicPermission objects in the container.
| |
| implies | back to summary |
|---|---|
| public boolean implies(Permission permission) Implements abstract java. Check and see if this set of permissions implies the permissions expressed in "permission".
| |
| readObject | back to summary |
|---|---|
| private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException readObject is called to restore the state of the
| |
| writeObject | back to summary |
|---|---|
| private void writeObject(ObjectOutputStream out) throws IOException Writes the contents of the perms field out as a Hashtable for serialization compatibility with earlier releases. all_allowed and permClass unchanged.
| |