Package java.security
Class AccessControlException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.SecurityException
java.security.AccessControlException
- All Implemented Interfaces:
Serializable
public class AccessControlException extends SecurityException
AccessControlException is thrown if the access control infrastructure
denies protected access due to missing permissions.- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description AccessControlException(String message)Constructs a new instance ofAccessControlExceptionwith the given message.AccessControlException(String message, Permission perm)Constructs a new instance ofAccessControlExceptionwith the given message and the requestedPermissionwhich was not granted. -
Method Summary
Modifier and Type Method Description PermissiongetPermission()Returns the requested permission that caused this Exception ornullif there is no correspondingPermission.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
AccessControlException
Constructs a new instance ofAccessControlExceptionwith the given message.- Parameters:
message- the detail message for this exception.
-
AccessControlException
Constructs a new instance ofAccessControlExceptionwith the given message and the requestedPermissionwhich was not granted.- Parameters:
message- the detail message for the exception.perm- the requestedPermissionwhich was not granted.
-
-
Method Details
-
getPermission
Returns the requested permission that caused this Exception ornullif there is no correspondingPermission.- Returns:
- the requested permission that caused this Exception, maybe
null.
-