Code example for Permission

Methods: getName

0
            super(); 
        } 
 
        public void checkPermission(Permission perm) {
            if (perm instanceof RuntimePermission) {
                if ("selectorProvider".equals(perm.getName())) {
                    throw new SecurityException();
                } 
            } 
        } 
 
        public void checkPermission(Permission perm, Object context) {
            if (perm instanceof RuntimePermission) {
                if ("selectorProvider".equals(perm.getName())) {
                    throw new SecurityException();
                } 
            } 
        } 
    } 
 
    private class MockSelectorProvider extends SelectorProvider {