Code example for Permissions

Methods: implies

0
public class IdentityScopeTest extends TestCase {
 
    public static class MySecurityManager extends SecurityManager {
        public Permissions denied = new Permissions(); 
        public void checkPermission(Permission permission){
            if (denied!=null && denied.implies(permission)) throw new SecurityException();
        } 
    } 
     
    public static void main(String[] args) {
        junit.textui.TestRunner.run(IdentityScopeTest.class); 
    } 
     
    IdentityScope is;
 
    /** 
     * Class under test for String toString() 
     */ 
    @TestTargetNew( 
        level = TestLevel.COMPLETE, 
        notes = "",