Spec-Zone .ru
спецификации, руководства, описания, API
Please note that the specifications and other information contained herein are not final and are subject to change. The information is being made available to you solely for purpose of evaluation.

Java™ Platform
Standard Ed. 7

DRAFT ea-b118

java.dyn
Class LinkagePermission

java.lang.Object
  extended by java.security.Permission
      extended by java.security.BasicPermission
          extended by java.dyn.LinkagePermission
All Implemented Interfaces:
Serializable, Guard

public final class LinkagePermission
extends BasicPermission

PROVISIONAL API, WORK IN PROGRESS: This class is for managing runtime permission checking for operations performed by methods in the Linkage class. Like a RuntimePermission, on which it is modeled, a LinkagePermission contains a target name but no actions list; you either have the named permission or you don't.

The following table lists all the possible LinkagePermission target names, and for each provides a description of what the permission allows and a discussion of the risks of granting code the permission.

Permission Target Name What the Permission Allows Risks of Allowing this Permission
invalidateAll Force the relinking of invokedynamic call sites everywhere. This could allow an attacker to slow down the system, or perhaps expose timing bugs in a dynamic language implementations, by forcing redundant relinking operations.
invalidateCallerClass.{class name} Force the relinking of invokedynamic call sites in the given class. See invalidateAll.

ISSUE: Is this still needed?

See Also:
RuntimePermission, SecurityManager, Serialized Form

Constructor Summary
Constructor and Description
LinkagePermission(String name)
          Create a new LinkagePermission with the given name.
LinkagePermission(String name, Class<?> clazz)
          Create a new LinkagePermission with the given name on the given class.
 
Method Summary
Modifier and Type Method and Description
 
Methods inherited from class java.security.BasicPermission
equals, getActions, hashCode, implies, newPermissionCollection
 
Methods inherited from class java.security.Permission
checkGuard, getName, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LinkagePermission

public LinkagePermission(String name)
Create a new LinkagePermission with the given name. The name is the symbolic name of the LinkagePermission, such as "invalidateCallerClass.*", etc. An asterisk may appear at the end of the name, following a ".", or by itself, to signify a wildcard match.

Parameters:
name - the name of the LinkagePermission

LinkagePermission

public LinkagePermission(String name,
                         Class<?> clazz)
Create a new LinkagePermission with the given name on the given class. Equivalent to LinkagePermission(name+"."+clazz.getName()).

Parameters:
name - the name of the LinkagePermission
clazz - the class affected by the permission

Java™ Platform
Standard Ed. 7

DRAFT ea-b118

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.

Copyright © 1993, 2010, Oracle Corporation. All rights reserved.
DRAFT ea-b118

Scripting on this page tracks web page traffic, but does not change the content in any way.