javax.crypto
final class: CryptoAllPermissionCollection [javadoc |
source]
java.lang.Object
java.security.PermissionCollection
javax.crypto.CryptoAllPermissionCollection
All Implemented Interfaces:
java$io$Serializable, Serializable
A CryptoAllPermissionCollection stores a collection
of CryptoAllPermission permissions.
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method from javax.crypto.CryptoAllPermissionCollection Detail: |
public void add(Permission permission) {
if (isReadOnly())
throw new SecurityException("attempt to add a Permission to " +
"a readonly PermissionCollection");
if (permission != CryptoAllPermission.INSTANCE)
return;
all_allowed = true;
}
Adds a permission to the CryptoAllPermissions. |
public Enumeration elements() {
Vector v = new Vector(1);
if (all_allowed) v.add(CryptoAllPermission.INSTANCE);
return v.elements();
}
Returns an enumeration of all the CryptoAllPermission
objects in the container. |
public boolean implies(Permission permission) {
if (!(permission instanceof CryptoPermission)) {
return false;
}
return all_allowed;
}
Check and see if this set of permissions implies the permissions
expressed in "permission". |