Code example for Permission

Methods: getName

0
                .isSiteLocalAddress());
    } 
 
    class MockSecurityManager extends SecurityManager {
        public void checkPermission(Permission permission) {
            if (permission.getName().equals("setSecurityManager")){
                return; 
            } 
            if (permission.getName().equals("3d.com")){
                throw new SecurityException();
            } 
            super.checkPermission(permission);
        } 
    } 
}