Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.eclipse.osgi.framework.internal.core
Class PermissionsHash  view PermissionsHash download PermissionsHash.java

java.lang.Object
  extended byjava.security.PermissionCollection
      extended byorg.eclipse.osgi.framework.internal.core.PermissionsHash
All Implemented Interfaces:
java.io.Serializable

class PermissionsHash
extends java.security.PermissionCollection

A simple Hashtable based collection of Permission objects.

The class' .implies method simply scans each permission individually and asks if the permission should be granted. No addition semantics is provided by the collection, so it is not possible to grant permissions whose "grantedness" is split across multiple stored Permissions.

Instances of this class can be used to store heterogeneous collections of permissions, as long as it is not necessary to remember when multiple occurances of .equal permissions are added.


Field Summary
(package private)  java.util.Hashtable perms
          A hashtable to store the elements of the collection.
 
Fields inherited from class java.security.PermissionCollection
 
Constructor Summary
PermissionsHash()
          Constructs a new instance of this class.
 
Method Summary
 void add(java.security.Permission perm)
          Adds the argument to the collection.
 java.util.Enumeration elements()
          Answers an enumeration of the permissions in the receiver.
 boolean implies(java.security.Permission perm)
          Indicates whether the argument permission is implied by the permissions contained in the receiver.
 
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

java.util.Hashtable perms
A hashtable to store the elements of the collection.

Constructor Detail

PermissionsHash

public PermissionsHash()
Constructs a new instance of this class.

Method Detail

add

public void add(java.security.Permission perm)
Adds the argument to the collection.


elements

public java.util.Enumeration elements()
Answers an enumeration of the permissions in the receiver.


implies

public boolean implies(java.security.Permission perm)
Indicates whether the argument permission is implied by the permissions contained in the receiver.