Code example for Permissions

Methods: implies

0
        } 
        public PermissionCollection getPermissions(ProtectionDomain pd) {
            return perms;
        } 
        public boolean implies(ProtectionDomain pd, Permission p) {
            return perms.implies(p);
        } 
        public void refresh() {} 
        public String toString() {
            List<Permission> ps = new ArrayList<Permission>();
            for (Enumeration<Permission> e = perms.elements(); e.hasMoreElements();)
                ps.add(e.nextElement());
            return "AdjustablePolicy with permissions " + ps;
        } 
    } 
 
    /** 
     * Returns a policy containing all the permissions we ever need. 
     */ 
    public static Policy permissivePolicy() {
        return new AdjustablePolicy