home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / java / security / AllPermissionCollection.class (.txt) < prev    next >
Encoding:
Java Class File  |  2006-11-29  |  1.2 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 (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.