1 /*
2 * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
64 * <td>This could allow an attacker to slow down the system,
65 * or perhaps expose timing bugs in a dynamic language implementations,
66 * by forcing redundant relinking operations.</td>
67 * </tr>
68 *
69 *
70 * <tr>
71 * <td>invalidateCallerClass.{class name}</td>
72 * <td>Force the relinking of invokedynamic call sites in the given class.</td>
73 * <td>See {@code invalidateAll}.</td>
74 * </tr>
75 * </table>
76 *
77 * @see java.security.RuntimePermission
78 * @see java.lang.SecurityManager
79 *
80 * @author John Rose, JSR 292 EG
81 */
82
83 public final class LinkagePermission extends BasicPermission {
84 /**
85 * Create a new LinkagePermission with the given name.
86 * The name is the symbolic name of the LinkagePermission, such as
87 * "registerBootstrapMethod", "invalidateCallerClass.*", etc. An asterisk
88 * may appear at the end of the name, following a ".", or by itself, to
89 * signify a wildcard match.
90 *
91 * @param name the name of the LinkagePermission
92 */
93 public LinkagePermission(String name) {
94 super(name);
95 }
96
97 /**
98 * Create a new LinkagePermission with the given name on the given class.
99 * Equivalent to {@code LinkagePermission(name+"."+clazz.getName())}.
100 *
101 * @param name the name of the LinkagePermission
102 * @param clazz the class affected by the permission
103 */
|
1 /*
2 * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
64 * <td>This could allow an attacker to slow down the system,
65 * or perhaps expose timing bugs in a dynamic language implementations,
66 * by forcing redundant relinking operations.</td>
67 * </tr>
68 *
69 *
70 * <tr>
71 * <td>invalidateCallerClass.{class name}</td>
72 * <td>Force the relinking of invokedynamic call sites in the given class.</td>
73 * <td>See {@code invalidateAll}.</td>
74 * </tr>
75 * </table>
76 *
77 * @see java.security.RuntimePermission
78 * @see java.lang.SecurityManager
79 *
80 * @author John Rose, JSR 292 EG
81 */
82
83 public final class LinkagePermission extends BasicPermission {
84 private static final long serialVersionUID = 292L;
85
86 /**
87 * Create a new LinkagePermission with the given name.
88 * The name is the symbolic name of the LinkagePermission, such as
89 * "registerBootstrapMethod", "invalidateCallerClass.*", etc. An asterisk
90 * may appear at the end of the name, following a ".", or by itself, to
91 * signify a wildcard match.
92 *
93 * @param name the name of the LinkagePermission
94 */
95 public LinkagePermission(String name) {
96 super(name);
97 }
98
99 /**
100 * Create a new LinkagePermission with the given name on the given class.
101 * Equivalent to {@code LinkagePermission(name+"."+clazz.getName())}.
102 *
103 * @param name the name of the LinkagePermission
104 * @param clazz the class affected by the permission
105 */
|