jdk/src/share/classes/java/awt/AWTPermission.java
author henryjen
Tue, 10 Jun 2014 16:18:54 -0700
changeset 24865 09b1d992ca72
parent 23010 6dadb192ad81
permissions -rw-r--r--
8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo Reviewed-by: mduigou, lancea, alanb, mullan
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
23010
6dadb192ad81 8029235: Update copyright year to match last edit in jdk8 jdk repository for 2013
lana
parents: 21957
diff changeset
     2
 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4256
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4256
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4256
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4256
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4256
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package java.awt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
import java.security.BasicPermission;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
 * This class is for AWT permissions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
 * An <code>AWTPermission</code> contains a target name but
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
 * no actions list; you either have the named permission
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 * or you don't.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 * The target name is the name of the AWT permission (see below). The naming
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 * convention follows the hierarchical property naming convention.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
 * Also, an asterisk could be used to represent all AWT permissions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
 * The following table lists all the possible <code>AWTPermission</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
 * target names, and for each provides a description of what the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
 * permission allows and a discussion of the risks of granting code
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
 * the permission.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
 * <table border=1 cellpadding=5 summary="AWTPermission target names, descriptions, and associated risks.">
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
 * <tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
 * <th>Permission Target Name</th>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
 * <th>What the Permission Allows</th>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
 * <th>Risks of Allowing this Permission</th>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
 * <tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
 *   <td>accessClipboard</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
 *   <td>Posting and retrieval of information to and from the AWT clipboard</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
 *   <td>This would allow malfeasant code to share
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
 * potentially sensitive or confidential information.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
 * <tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
 *   <td>accessEventQueue</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
 *   <td>Access to the AWT event queue</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
 *   <td>After retrieving the AWT event queue,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
 * malicious code may peek at and even remove existing events
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
 * from its event queue, as well as post bogus events which may purposefully
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
 * cause the application or applet to misbehave in an insecure manner.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
 * <tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
 *   <td>accessSystemTray</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
 *   <td>Access to the AWT SystemTray instance</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
 *   <td>This would allow malicious code to add tray icons to the system tray.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
 * First, such an icon may look like the icon of some known application
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
 * (such as a firewall or anti-virus) and order a user to do something unsafe
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
 * (with help of balloon messages). Second, the system tray may be glutted with
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
 * tray icons so that no one could add a tray icon anymore.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
 * <tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
 *   <td>createRobot</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
 *   <td>Create java.awt.Robot objects</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
 *   <td>The java.awt.Robot object allows code to generate native-level
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
 * mouse and keyboard events as well as read the screen. It could allow
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
 * malicious code to control the system, run other programs, read the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
 * display, and deny mouse and keyboard access to the user.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
 * <tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
 *   <td>fullScreenExclusive</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
 *   <td>Enter full-screen exclusive mode</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
 *   <td>Entering full-screen exclusive mode allows direct access to
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
 * low-level graphics card memory.  This could be used to spoof the
4256
24d614d4764a 6711717: PIT: Security Icon is hidden for FullScreen apps, WinXP
anthony
parents: 2
diff changeset
    94
 * system, since the program is in direct control of rendering. Depending on
24d614d4764a 6711717: PIT: Security Icon is hidden for FullScreen apps, WinXP
anthony
parents: 2
diff changeset
    95
 * the implementation, the security warning may not be shown for the windows
24d614d4764a 6711717: PIT: Security Icon is hidden for FullScreen apps, WinXP
anthony
parents: 2
diff changeset
    96
 * used to enter the full-screen exclusive mode (assuming that the {@code
24d614d4764a 6711717: PIT: Security Icon is hidden for FullScreen apps, WinXP
anthony
parents: 2
diff changeset
    97
 * fullScreenExclusive} permission has been granted to this application). Note
24d614d4764a 6711717: PIT: Security Icon is hidden for FullScreen apps, WinXP
anthony
parents: 2
diff changeset
    98
 * that this behavior does not mean that the {@code
24d614d4764a 6711717: PIT: Security Icon is hidden for FullScreen apps, WinXP
anthony
parents: 2
diff changeset
    99
 * showWindowWithoutWarningBanner} permission will be automatically granted to
24d614d4764a 6711717: PIT: Security Icon is hidden for FullScreen apps, WinXP
anthony
parents: 2
diff changeset
   100
 * the application which has the {@code fullScreenExclusive} permission:
24d614d4764a 6711717: PIT: Security Icon is hidden for FullScreen apps, WinXP
anthony
parents: 2
diff changeset
   101
 * non-full-screen windows will continue to be shown with the security
24d614d4764a 6711717: PIT: Security Icon is hidden for FullScreen apps, WinXP
anthony
parents: 2
diff changeset
   102
 * warning.</td>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
 * <tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
 *   <td>listenToAllAWTEvents</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
 *   <td>Listen to all AWT events, system-wide</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
 *   <td>After adding an AWT event listener,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
 * malicious code may scan all AWT events dispatched in the system,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
 * allowing it to read all user input (such as passwords).  Each
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
 * AWT event listener is called from within the context of that
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
 * event queue's EventDispatchThread, so if the accessEventQueue
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
 * permission is also enabled, malicious code could modify the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
 * contents of AWT event queues system-wide, causing the application
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
 * or applet to misbehave in an insecure manner.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
 * <tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
 *   <td>readDisplayPixels</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
 *   <td>Readback of pixels from the display screen</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
 *   <td>Interfaces such as the java.awt.Composite interface or the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
 * java.awt.Robot class allow arbitrary code to examine pixels on the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
 * display enable malicious code to snoop on the activities of the user.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
 * <tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
 *   <td>replaceKeyboardFocusManager</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
 *   <td>Sets the <code>KeyboardFocusManager</code> for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
 *       a particular thread.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
 *   <td>When <code>SecurityManager</code> is installed, the invoking
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
 *       thread must be granted this permission in order to replace
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
 *       the current <code>KeyboardFocusManager</code>.  If permission
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
 *       is not granted, a <code>SecurityException</code> will be thrown.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
 * <tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
 *   <td>setAppletStub</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
 *   <td>Setting the stub which implements Applet container services</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
 *   <td>Malicious code could set an applet's stub and result in unexpected
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
 * behavior or denial of service to an applet.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
 * <tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
 *   <td>setWindowAlwaysOnTop</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
 *   <td>Setting always-on-top property of the window: {@link Window#setAlwaysOnTop}</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
 *   <td>The malicious window might make itself look and behave like a real full desktop, so that
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
 * information entered by the unsuspecting user is captured and subsequently misused </td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
 * <tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
 *   <td>showWindowWithoutWarningBanner</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
 *   <td>Display of a window without also displaying a banner warning
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
 * that the window was created by an applet</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
 *   <td>Without this warning,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
 * an applet may pop up windows without the user knowing that they
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
 * belong to an applet.  Since users may make security-sensitive
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
 * decisions based on whether or not the window belongs to an applet
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
 * (entering a username and password into a dialog box, for example),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
 * disabling this warning banner may allow applets to trick the user
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
 * into entering such information.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
 * <tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
 *   <td>toolkitModality</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
 *   <td>Creating {@link Dialog.ModalityType#TOOLKIT_MODAL TOOLKIT_MODAL} dialogs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
 *       and setting the {@link Dialog.ModalExclusionType#TOOLKIT_EXCLUDE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
 *       TOOLKIT_EXCLUDE} window property.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
 *   <td>When a toolkit-modal dialog is shown from an applet, it blocks all other
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
 * applets in the browser. When launching applications from Java Web Start,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
 * its windows (such as the security dialog) may also be blocked by toolkit-modal
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
 * dialogs, shown from these applications.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
 * <tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
 *   <td>watchMousePointer</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
 *   <td>Getting the information about the mouse pointer position at any
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
 * time</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
 *   <td>Constantly watching the mouse pointer,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
 * an applet can make guesses about what the user is doing, i.e. moving
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
 * the mouse to the lower left corner of the screen most likely means that
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
 * the user is about to launch an application. If a virtual keypad is used
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
 * so that keyboard is emulated using the mouse, an applet may guess what
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
 * is being typed.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
 * </table>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
 * @see java.security.BasicPermission
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
 * @see java.security.Permission
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
 * @see java.security.Permissions
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
 * @see java.security.PermissionCollection
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
 * @see java.lang.SecurityManager
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
 * @author Marianne Mueller
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
 * @author Roland Schemers
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
public final class AWTPermission extends BasicPermission {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
    /** use serialVersionUID from the Java 2 platform for interoperability */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
    private static final long serialVersionUID = 8890392402588814465L;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
     * Creates a new <code>AWTPermission</code> with the specified name.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
     * The name is the symbolic name of the <code>AWTPermission</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
     * such as "topLevelWindow", "systemClipboard", etc. An asterisk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
     * may be used to indicate all AWT permissions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
     * @param name the name of the AWTPermission
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
     * @throws NullPointerException if <code>name</code> is <code>null</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
     * @throws IllegalArgumentException if <code>name</code> is empty.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
    public AWTPermission(String name)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
        super(name);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
     * Creates a new <code>AWTPermission</code> object with the specified name.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
     * The name is the symbolic name of the <code>AWTPermission</code>, and the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
     * actions string is currently unused and should be <code>null</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
     * @param name the name of the <code>AWTPermission</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
     * @param actions should be <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
     * @throws NullPointerException if <code>name</code> is <code>null</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
     * @throws IllegalArgumentException if <code>name</code> is empty.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
    public AWTPermission(String name, String actions)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
        super(name, actions);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
}