APIdia Launch Partner
Top Description Fields Constructors Methods
java.security

public Class AccessControlException

extends SecurityException
Class Inheritance
Annotations
@Deprecated
since:17
forRemoval:true

Deprecated

for removal since 17.

This exception was only useful in conjunction with the Security Manager, which is no longer supported. There is no replacement for the Security Manager or this class.

This exception was originally thrown by the AccessController to indicate that a requested access was denied.
Authors
Li Gong, Roland Schemers
Since
1.2

Field Summary

Modifier and TypeField and Description
private Permission
private static final long

Constructor Summary

AccessConstructor and Description
public
AccessControlException(String
the detail message.
s
)

Constructs an AccessControlException with the specified, detailed message.

public
AccessControlException(String
the detail message.
s
,
Permission
the permission that caused the exception.
p
)

Constructs an AccessControlException with the specified, detailed message, and the requested permission that caused the exception.

Method Summary

Modifier and TypeMethod and Description
public Permission

Returns:

the Permission object.
getPermission
()

Gets the Permission object associated with this exception, or null if there was no corresponding Permission object.

Field Detail

permback to summary
private Permission perm
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.lang.SecurityException.serialVersionUID.

Annotations
@Serial

Constructor Detail

AccessControlExceptionback to summary
public AccessControlException(String s)

Constructs an AccessControlException with the specified, detailed message.

Parameters
s:String

the detail message.

AccessControlExceptionback to summary
public AccessControlException(String s, Permission p)

Constructs an AccessControlException with the specified, detailed message, and the requested permission that caused the exception.

Parameters
s:String

the detail message.

p:Permission

the permission that caused the exception.

Method Detail

getPermissionback to summary
public Permission getPermission()

Gets the Permission object associated with this exception, or null if there was no corresponding Permission object.

Returns:Permission

the Permission object.