APIdia Launch Partner
Top Description Fields Constructors Methods
java.awt

public final Class AWTPermission

extends BasicPermission
Class Inheritance
Annotations
@Deprecated
since:24
forRemoval:true
Imports
java.io.Serial, java.security.BasicPermission

Deprecated

for removal since 24.

There is no replacement for this class.

This class is for AWT permissions. An AWTPermission contains a target name but no actions list; you either have the named permission or you don't.

API Note

This permission cannot be used for controlling access to resources as the Security Manager is no longer supported. Consequently this class is deprecated for removal in a future release.

Authors
Marianne Mueller, Roland Schemers
See Also
java.security.BasicPermission, java.security.Permission, java.security.Permissions, java.security.PermissionCollection, java.lang.SecurityManager

Field Summary

Modifier and TypeField and Description
private static final long
serialVersionUID

Hides java.security.BasicPermission.serialVersionUID.

Use serialVersionUID from JDK 1.2 for interoperability.

Constructor Summary

AccessConstructor and Description
public
AWTPermission(String
the name of the AWTPermission
name
)

Creates a new AWTPermission with the specified name.

public
AWTPermission(String
the name of the AWTPermission
name
,
String
should be null
actions
)

Creates a new AWTPermission object with the specified name.

Method Summary

Inherited from java.security.BasicPermission:
equalsgetActionshashCodeimpliesnewPermissionCollection

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.security.BasicPermission.serialVersionUID.

Use serialVersionUID from JDK 1.2 for interoperability.

Annotations
@Serial

Constructor Detail

AWTPermissionback to summary
public AWTPermission(String name)

Creates a new AWTPermission with the specified name. The name is the symbolic name of the AWTPermission, such as "topLevelWindow", "systemClipboard", etc. An asterisk may be used to indicate all AWT permissions.

Parameters
name:String

the name of the AWTPermission

Exceptions
NullPointerException:
if name is null.
IllegalArgumentException:
if name is empty.
AWTPermissionback to summary
public AWTPermission(String name, String actions)

Creates a new AWTPermission object with the specified name. The name is the symbolic name of the AWTPermission, and the actions string is currently unused and should be null.

Parameters
name:String

the name of the AWTPermission

actions:String

should be null

Exceptions
NullPointerException:
if name is null.
IllegalArgumentException:
if name is empty.