Code example for Permissions

Methods: add

0
     */ 
    public void grantMode() { 
        mode = false;
 
        permissionsDenied.add(new AllPermission());
        permissionsGranted = new Permissions();
 
        // junit harness stuff 
        permissionsGranted
                .add(new PropertyPermission("line.separator", "read"));
        permissionsGranted.add(new RuntimePermission("exitVM"));
        permissionsGranted.add(new LoggingPermission("control", null));
 
        //grant permission to install security manager :-) 
        permissionsGranted.add(new RuntimePermission("setSecurityManager"));
    } 
 
    /** 
     * Tests iterator interface 
     *  
     */