开源 企业版 高校版 私有云 模力方舟 AI 队友
代码拉取完成,页面将自动刷新
forked from cxylk/Java-Notes
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
已有帐号? 立即登录
文件
main
分支 (2)
main
gh-pages
main
分支 (2)
main
gh-pages
克隆/下载
克隆/下载
提示
下载代码请复制以下命令到终端执行
为确保你提交的代码身份被 Gitee 正确识别,请执行以下命令完成配置
初次使用 SSH 协议进行代码克隆、推送等操作时,需按下述提示完成 SSH 配置
1 生成 RSA 密钥
2 获取 RSA 公钥内容,并配置到 SSH公钥
在 Gitee 上使用 SVN,请访问 使用指南
使用 HTTPS 协议时,命令行会出现如下账号密码验证步骤。基于安全考虑,Gitee 建议 配置并使用私人令牌 替代登录密码进行克隆、推送等操作
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # 私人令牌
main
分支 (2)
main
gh-pages
Java-Notes
/
JavaSourceLearn
/
src
/
java
/
awt
/
AWTPermission.java
Java-Notes
/
JavaSourceLearn
/
src
/
java
/
awt
/
AWTPermission.java
AWTPermission.java 8.48 KB
一键复制 编辑 原始数据 按行查看 历史
cxylk 提交于 2021年01月21日 16:33 +08:00 . :rainbow: idea构建jdk源码
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package java.awt;
import java.security.BasicPermission;
/**
* This class is for AWT permissions.
* An <code>AWTPermission</code> contains a target name but
* no actions list; you either have the named permission
* or you don't.
*
* <P>
* The target name is the name of the AWT permission (see below). The naming
* convention follows the hierarchical property naming convention.
* Also, an asterisk could be used to represent all AWT permissions.
*
* <P>
* The following table lists all the possible <code>AWTPermission</code>
* target names, and for each provides a description of what the
* permission allows and a discussion of the risks of granting code
* the permission.
*
* <table border=1 cellpadding=5 summary="AWTPermission target names, descriptions, and associated risks.">
* <tr>
* <th>Permission Target Name</th>
* <th>What the Permission Allows</th>
* <th>Risks of Allowing this Permission</th>
* </tr>
*
* <tr>
* <td>accessClipboard</td>
* <td>Posting and retrieval of information to and from the AWT clipboard</td>
* <td>This would allow malfeasant code to share
* potentially sensitive or confidential information.</td>
* </tr>
*
* <tr>
* <td>accessEventQueue</td>
* <td>Access to the AWT event queue</td>
* <td>After retrieving the AWT event queue,
* malicious code may peek at and even remove existing events
* from its event queue, as well as post bogus events which may purposefully
* cause the application or applet to misbehave in an insecure manner.</td>
* </tr>
*
* <tr>
* <td>accessSystemTray</td>
* <td>Access to the AWT SystemTray instance</td>
* <td>This would allow malicious code to add tray icons to the system tray.
* First, such an icon may look like the icon of some known application
* (such as a firewall or anti-virus) and order a user to do something unsafe
* (with help of balloon messages). Second, the system tray may be glutted with
* tray icons so that no one could add a tray icon anymore.</td>
* </tr>
*
* <tr>
* <td>createRobot</td>
* <td>Create java.awt.Robot objects</td>
* <td>The java.awt.Robot object allows code to generate native-level
* mouse and keyboard events as well as read the screen. It could allow
* malicious code to control the system, run other programs, read the
* display, and deny mouse and keyboard access to the user.</td>
* </tr>
*
* <tr>
* <td>fullScreenExclusive</td>
* <td>Enter full-screen exclusive mode</td>
* <td>Entering full-screen exclusive mode allows direct access to
* low-level graphics card memory. This could be used to spoof the
* system, since the program is in direct control of rendering. Depending on
* the implementation, the security warning may not be shown for the windows
* used to enter the full-screen exclusive mode (assuming that the {@code
* fullScreenExclusive} permission has been granted to this application). Note
* that this behavior does not mean that the {@code
* showWindowWithoutWarningBanner} permission will be automatically granted to
* the application which has the {@code fullScreenExclusive} permission:
* non-full-screen windows will continue to be shown with the security
* warning.</td>
* </tr>
*
* <tr>
* <td>listenToAllAWTEvents</td>
* <td>Listen to all AWT events, system-wide</td>
* <td>After adding an AWT event listener,
* malicious code may scan all AWT events dispatched in the system,
* allowing it to read all user input (such as passwords). Each
* AWT event listener is called from within the context of that
* event queue's EventDispatchThread, so if the accessEventQueue
* permission is also enabled, malicious code could modify the
* contents of AWT event queues system-wide, causing the application
* or applet to misbehave in an insecure manner.</td>
* </tr>
*
* <tr>
* <td>readDisplayPixels</td>
* <td>Readback of pixels from the display screen</td>
* <td>Interfaces such as the java.awt.Composite interface or the
* java.awt.Robot class allow arbitrary code to examine pixels on the
* display enable malicious code to snoop on the activities of the user.</td>
* </tr>
*
* <tr>
* <td>replaceKeyboardFocusManager</td>
* <td>Sets the <code>KeyboardFocusManager</code> for
* a particular thread.
* <td>When <code>SecurityManager</code> is installed, the invoking
* thread must be granted this permission in order to replace
* the current <code>KeyboardFocusManager</code>. If permission
* is not granted, a <code>SecurityException</code> will be thrown.
* </tr>
*
* <tr>
* <td>setAppletStub</td>
* <td>Setting the stub which implements Applet container services</td>
* <td>Malicious code could set an applet's stub and result in unexpected
* behavior or denial of service to an applet.</td>
* </tr>
*
* <tr>
* <td>setWindowAlwaysOnTop</td>
* <td>Setting always-on-top property of the window: {@link Window#setAlwaysOnTop}</td>
* <td>The malicious window might make itself look and behave like a real full desktop, so that
* information entered by the unsuspecting user is captured and subsequently misused </td>
* </tr>
*
* <tr>
* <td>showWindowWithoutWarningBanner</td>
* <td>Display of a window without also displaying a banner warning
* that the window was created by an applet</td>
* <td>Without this warning,
* an applet may pop up windows without the user knowing that they
* belong to an applet. Since users may make security-sensitive
* decisions based on whether or not the window belongs to an applet
* (entering a username and password into a dialog box, for example),
* disabling this warning banner may allow applets to trick the user
* into entering such information.</td>
* </tr>
*
* <tr>
* <td>toolkitModality</td>
* <td>Creating {@link Dialog.ModalityType#TOOLKIT_MODAL TOOLKIT_MODAL} dialogs
* and setting the {@link Dialog.ModalExclusionType#TOOLKIT_EXCLUDE
* TOOLKIT_EXCLUDE} window property.</td>
* <td>When a toolkit-modal dialog is shown from an applet, it blocks all other
* applets in the browser. When launching applications from Java Web Start,
* its windows (such as the security dialog) may also be blocked by toolkit-modal
* dialogs, shown from these applications.</td>
* </tr>
*
* <tr>
* <td>watchMousePointer</td>
* <td>Getting the information about the mouse pointer position at any
* time</td>
* <td>Constantly watching the mouse pointer,
* an applet can make guesses about what the user is doing, i.e. moving
* the mouse to the lower left corner of the screen most likely means that
* the user is about to launch an application. If a virtual keypad is used
* so that keyboard is emulated using the mouse, an applet may guess what
* is being typed.</td>
* </tr>
* </table>
*
* @see java.security.BasicPermission
* @see java.security.Permission
* @see java.security.Permissions
* @see java.security.PermissionCollection
* @see java.lang.SecurityManager
*
*
* @author Marianne Mueller
* @author Roland Schemers
*/
public final class AWTPermission extends BasicPermission {
/** use serialVersionUID from the Java 2 platform for interoperability */
private static final long serialVersionUID = 8890392402588814465L;
/**
* Creates a new <code>AWTPermission</code> with the specified name.
* The name is the symbolic name of the <code>AWTPermission</code>,
* such as "topLevelWindow", "systemClipboard", etc. An asterisk
* may be used to indicate all AWT permissions.
*
* @param name the name of the AWTPermission
*
* @throws NullPointerException if <code>name</code> is <code>null</code>.
* @throws IllegalArgumentException if <code>name</code> is empty.
*/
public AWTPermission(String name)
{
super(name);
}
/**
* Creates a new <code>AWTPermission</code> object with the specified name.
* The name is the symbolic name of the <code>AWTPermission</code>, and the
* actions string is currently unused and should be <code>null</code>.
*
* @param name the name of the <code>AWTPermission</code>
* @param actions should be <code>null</code>
*
* @throws NullPointerException if <code>name</code> is <code>null</code>.
* @throws IllegalArgumentException if <code>name</code> is empty.
*/
public AWTPermission(String name, String actions)
{
super(name, actions);
}
}
Loading...
举报
举报成功
我们将于2个工作日内通过站内信反馈结果给你!
请认真填写举报原因,尽可能描述详细。
请选择举报类型
取消
发送
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

简介

Java学习过程中遇到的知识点总结,复习笔记
暂无标签
Apache-2.0
使用 Apache-2.0 开源许可协议
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
编辑仓库简介
简介内容
主页
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/machunpeng/Java-Notes.git
git@gitee.com:machunpeng/Java-Notes.git
machunpeng
Java-Notes
Java-Notes
main
点此查找更多帮助

搜索帮助

评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册

AltStyle によって変換されたページ (->オリジナル) /