LinkerServices
interface.
Modifier and Type | Class and Description |
---|---|
private static class | LinkerServicesImpl.
Used to marshal a checked exception out of Supplier.get() in getGuardedInvocation. |
Modifier and Type | Field and Description |
---|---|
private final MethodHandleTransformer | |
private static final ThreadLocal | |
private final GuardingDynamicLinker | |
private final TypeConverterFactory |
Access | Constructor and Description |
---|---|
pack-priv | LinkerServicesImpl(final TypeConverterFactory
the type converter factory exposed by the services. typeConverterFactory, final GuardingDynamicLinker the top level linker used by the services. topLevelLinker, final MethodHandleTransformer a method handle transformer that is supposed to act as the implementation of this
services' internalObjectsFilter)filterInternalObjects(java. method.Creates a new linker services object. |
Modifier and Type | Method and Description |
---|---|
public MethodHandle | asType(final MethodHandle
target method handle handle, final MethodType the types of source arguments fromType)Implements jdk. Similar to |
public boolean | canConvert(final Class<?>
the source type for the conversion from, final Class<?> the target type for the conversion to)Implements jdk. Returns true if there might exist a conversion between the requested
types (either an automatic JVM conversion, or one provided by any
available |
public ConversionComparator. | compareConversion(final Class<?>
the source type. sourceType, final Class<?> one potential target type targetType1, final Class<?> another potential target type. targetType2)Implements jdk. Determines which of the two type conversions from a source type to the two target types is preferred. |
public MethodHandle | filterInternalObjects(final MethodHandle
the target method handle target)Implements jdk. Modifies the method handle so that any parameters that can receive potentially internal language runtime objects will have a filter added on them to prevent them from escaping, potentially by wrapping them. |
pack-priv static MethodHandles. | |
public GuardedInvocation | getGuardedInvocation(final LinkRequest
a request for linking the invocation linkRequest)Implements jdk. Creates a guarded invocation delegating back to the |
public MethodHandle | getTypeConverter(final Class<?>
the type to convert from sourceType, final Class<?> the type to convert to targetType)Implements jdk. Given a source and target type, returns a method handle that converts between them. |
public <T> T | getWithLookup(final Supplier<T>
the operation to execute in context of the specified lookup. operation, final SecureLookupSupplier secure supplier of the lookup lookupSupplier)Implements jdk. Executes an operation within the context of a particular
|
private static <T> T |
internalObjectsFilter | back to summary |
---|---|
private final MethodHandleTransformer internalObjectsFilter |
threadLookupSupplier | back to summary |
---|---|
private static final ThreadLocal<SecureLookupSupplier> threadLookupSupplier |
topLevelLinker | back to summary |
---|---|
private final GuardingDynamicLinker topLevelLinker |
typeConverterFactory | back to summary |
---|---|
private final TypeConverterFactory typeConverterFactory |
LinkerServicesImpl | back to summary |
---|---|
pack-priv LinkerServicesImpl(final TypeConverterFactory typeConverterFactory, final GuardingDynamicLinker topLevelLinker, final MethodHandleTransformer internalObjectsFilter) Creates a new linker services object.
|
asType | back to summary |
---|---|
public MethodHandle asType(final MethodHandle handle, final MethodType fromType) Implements jdk. Doc from jdk. Similar to
|
canConvert | back to summary |
---|---|
public boolean canConvert(final Class<?> from, final Class<?> to) Implements jdk. Doc from jdk. Returns true if there might exist a conversion between the requested
types (either an automatic JVM conversion, or one provided by any
available |
compareConversion | back to summary |
---|---|
public ConversionComparator. Implements jdk. Doc from jdk. Determines which of the two type conversions from a source type to the
two target types is preferred. This is used for dynamic overloaded method
resolution. If the source type is convertible to exactly one target type
with a method invocation conversion, it is chosen, otherwise available
|
filterInternalObjects | back to summary |
---|---|
public MethodHandle filterInternalObjects(final MethodHandle target) Implements jdk. Doc from jdk. Modifies the method handle so that any parameters that can receive
potentially internal language runtime objects will have a filter added on
them to prevent them from escaping, potentially by wrapping them. It can
also potentially add an unwrapping filter to the return value. Basically
transforms the method handle using the transformer configured by
|
getCurrentLookup | back to summary |
---|---|
pack-priv static MethodHandles. |
getGuardedInvocation | back to summary |
---|---|
public GuardedInvocation getGuardedInvocation(final LinkRequest linkRequest) throws Exception Implements jdk. Doc from jdk. Creates a guarded invocation delegating back to the
|
getTypeConverter | back to summary |
---|---|
public MethodHandle getTypeConverter(final Class<?> sourceType, final Class<?> targetType) Implements jdk. Doc from jdk. Given a source and target type, returns a method handle that converts
between them. Never returns null; in worst case it will return an
identity conversion (that might fail for some values at runtime). You
rarely need to use this method directly and should mostly rely on
|
getWithLookup | back to summary |
---|---|
public <T> T getWithLookup(final Supplier<T> operation, final SecureLookupSupplier lookupSupplier) Implements jdk. Doc from jdk. Executes an operation within the context of a particular
|
getWithLookupInternal | back to summary |
---|---|
private static <T> T getWithLookupInternal(final Supplier<T> operation, final SecureLookupSupplier lookupSupplier) |
Modifier and Type | Field and Description |
---|---|
private static final long |
Access | Constructor and Description |
---|---|
public |
serialVersionUID | back to summary |
---|---|
private static final long serialVersionUID |
LinkerException | back to summary |
---|---|
public LinkerException(final Exception cause) |