Code example for Permissions

0
        boolean getPdTracked() { 
            return pdTracked;
        } 
 
        public PermissionCollection getPermissions(CodeSource cs) {
            return new Permissions();
        } 
 
        //        public PermissionCollection getPermissions(ProtectionDomain domain) { 
        //            return super.getPermissions(domain); 
        //        } 
        public boolean implies(ProtectionDomain domain, Permission permission) {
            if (trackPD != null && trackPD == domain) {
                pdTracked = true;
            } 
            return super.implies(domain, permission);
        } 
 
        public void refresh() { 
            // do nothing 
        }