CallSiteDescriptor
public class SecureLookupSupplier extends Object
MethodHandles.Lookup
object.
See getLookup()
for details.Modifier and Type | Field | Description |
---|---|---|
static String |
GET_LOOKUP_PERMISSION_NAME |
The name of a runtime permission required to successfully invoke the
getLookup() method. |
Constructor | Description |
---|---|
SecureLookupSupplier(MethodHandles.Lookup lookup) |
Creates a new secure lookup supplier, securing the passed lookup.
|
Modifier and Type | Method | Description |
---|---|---|
MethodHandles.Lookup |
getLookup() |
Returns the lookup secured by this
SecureLookupSupplier . |
protected MethodHandles.Lookup |
getLookupPrivileged() |
Returns the value of
getLookup() without a security check. |
public static final String GET_LOOKUP_PERMISSION_NAME
getLookup()
method.public SecureLookupSupplier(MethodHandles.Lookup lookup)
lookup
- the lookup to secure. Can not be null.NullPointerException
- if null is passed.public final MethodHandles.Lookup getLookup()
SecureLookupSupplier
.SecureLookupSupplier
.SecurityException
- if the secured lookup isn't the
MethodHandles.publicLookup()
, and a security manager is present,
and a check for RuntimePermission("dynalink.getLookup")
fails.protected final MethodHandles.Lookup getLookupPrivileged()
getLookup()
without a security check. Can
be used by subclasses to access the lookup quickly.getLookup()
. Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 2015, 2017, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.
DRAFT 9-Ubuntu+0-9b151-2