public class

AccessControlException

extends SecurityException
java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.lang.RuntimeException
         ↳ java.lang.SecurityException
           ↳ java.security.AccessControlException

Class Overview

AccessControlException is thrown if the access control infrastructure denies protected access due to missing permissions.

Summary

Public Constructors
AccessControlException(String message)
Constructs a new instance of AccessControlException with the given message.
AccessControlException(String message, Permission perm)
Constructs a new instance of AccessControlException with the given message and the requested Permission which was not granted.
Public Methods
Permission getPermission()
Returns the requested permission that caused this Exception or null if there is no corresponding Permission.
[Expand]
Inherited Methods
From class java.lang.Throwable
From class java.lang.Object

Public Constructors

public AccessControlException (String message)

Since: API Level 1

Constructs a new instance of AccessControlException with the given message.

Parameters
message the detail message for this exception.

public AccessControlException (String message, Permission perm)

Since: API Level 1

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.

Public Methods

public Permission getPermission ()

Since: API Level 1

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.