Code example for Permissions

Methods: implies

0
public class SignerTest 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(SignerTest.class); 
    } 
 
    /** 
     * @tests java.security.Signer#toString() 
     */ 
    @TestTargetNew( 
        level = TestLevel.COMPLETE, 
        notes = "", 
        method = "toString", 
        args = {}