public static boolean hasPermission ( Permission permission ) { SecurityManager security = System . getSecurityManager ( ) ; if ( security != null ) { try { security . checkPermission ( permission ) ; } catch ( java . security . AccessControlException e ) { return false ; } } return true ; }
Determines whether the specified permission is permitted .