Package java.security

Class 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 Details

    • AccessControlException

      public AccessControlException​(String message)
      Constructs a new instance of AccessControlException with the given message.
      Parameters:
      message - the detail message for this exception.
    • AccessControlException

      public AccessControlException​(String message, Permission perm)
      Constructs a new instance of AccessControlException with the given message and the requested Permission which was not granted.
      Parameters:
      message - the detail message for the exception.
      perm - the requested Permission which was not granted.
  • Method Details

    • getPermission

      public Permission getPermission()
      Returns the requested permission that caused this Exception or null if there is no corresponding Permission.
      Returns:
      the requested permission that caused this Exception, maybe null.