home *** CD-ROM | disk | FTP | other *** search
/ S283 Planetary Science &n…he Search for Life DVD 2 / DVD-ROM.iso / install / jre1_3 / lib / rt.jar / java / security / AllPermissionCollection.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  1.3 KB  |  36 lines

  1. package java.security;
  2.  
  3. import java.io.Serializable;
  4. import java.util.Enumeration;
  5.  
  6. final class AllPermissionCollection extends PermissionCollection implements Serializable {
  7.    private static final long serialVersionUID = -4023755556366636806L;
  8.    private boolean all_allowed = false;
  9.  
  10.    public AllPermissionCollection() {
  11.    }
  12.  
  13.    public void add(Permission var1) {
  14.       if (!(var1 instanceof AllPermission)) {
  15.          throw new IllegalArgumentException("invalid permission: " + var1);
  16.       } else if (((PermissionCollection)this).isReadOnly()) {
  17.          throw new SecurityException("attempt to add a Permission to a readonly PermissionCollection");
  18.       } else {
  19.          this.all_allowed = true;
  20.       }
  21.    }
  22.  
  23.    public boolean implies(Permission var1) {
  24.       return this.all_allowed;
  25.    }
  26.  
  27.    public Enumeration elements() {
  28.       return new 1(this);
  29.    }
  30.  
  31.    // $FF: synthetic method
  32.    static boolean access$000(AllPermissionCollection var0) {
  33.       return var0.all_allowed;
  34.    }
  35. }
  36.