Methods Summary |
---|
public void | add(java.security.Permission permission)Adds an {@code AllPermission} to the collection.
if (isReadOnly()) {
throw new SecurityException(Messages.getString("security.15")); //$NON-NLS-1$
}
if (!(permission instanceof AllPermission)) {
throw new IllegalArgumentException(Messages.getString("security.16", //$NON-NLS-1$
permission));
}
all = permission;
|
public java.util.Enumeration | elements()Returns the enumeration of the collection.
return new SingletonEnumeration<Permission>(all);
|
public boolean | implies(java.security.Permission permission)Indicates whether the argument permission is implied by the receiver.
{@code AllPermission} objects imply all other permissions.
return all != null;
|
private void | readObject(java.io.ObjectInputStream in)Restores internal state.
ObjectInputStream.GetField fields = in.readFields();
if (fields.get("all_allowed", false)) { //$NON-NLS-1$
all = new AllPermission();
}
|
private void | writeObject(java.io.ObjectOutputStream out)Writes the fields according to expected format, adding the boolean field
{@code all_allowed} which is {@code true} if this collection is not
empty.
ObjectOutputStream.PutField fields = out.putFields();
fields.put("all_allowed", all != null); //$NON-NLS-1$
out.writeFields();
|