Spec-Zone .ru
спецификации, руководства, описания, API
|
|
Java™ Platform Standard Ed. 7 DRAFT ea-b118 |
|||||||||
PREV NEXT | FRAMES NO FRAMES |
Package | Description |
---|---|
java.dyn | PROVISIONAL API, WORK IN PROGRESS: This package contains dynamic language support provided directly by the Java core class libraries and virtual machine. |
Uses of MethodHandle in java.dyn |
---|
Modifier and Type | Method and Description |
---|---|
static MethodHandle |
MethodHandles.arrayElementGetter(Class<?> arrayClass)
PROVISIONAL API, WORK IN PROGRESS: Produce a method handle giving read access to elements of an array. |
static MethodHandle |
MethodHandles.arrayElementSetter(Class<?> arrayClass)
PROVISIONAL API, WORK IN PROGRESS: Produce a method handle giving write access to elements of an array. |
MethodHandle |
MethodHandle.asCollector(int spreadArrayArgs)
Deprecated. Provisional and unstable; use MethodHandles.collectArguments(java.dyn.MethodHandle, java.dyn.MethodType) . |
MethodHandle |
MethodHandle.asMethodHandle()
Implementation of MethodHandleProvider , which returns this . |
MethodHandle |
MethodHandleProvider.asMethodHandle()
Produce a method handle which will serve as a behavioral proxy for the current object. |
MethodHandle |
CallSite.asMethodHandle()
Implementation of MethodHandleProvider which returns this.dynamicInvoker() . |
MethodHandle |
MethodHandle.asMethodHandle(MethodType type)
Implementation of MethodHandleProvider , which returns this.asType(type) . |
MethodHandle |
MethodHandleProvider.asMethodHandle(MethodType type)
Produce a method handle of a given type which will serve as a behavioral proxy for the current object. |
MethodHandle |
CallSite.asMethodHandle(MethodType type)
Implementation of MethodHandleProvider , which returns this.dynamicInvoker().asType(type) . |
MethodHandle |
MethodHandle.asSpreader(int keepPosArgs)
PROVISIONAL API, WORK IN PROGRESS: Produce a method handle which adapts, as its target, the current method handle. |
MethodHandle |
MethodHandle.asType(MethodType newType)
PROVISIONAL API, WORK IN PROGRESS: Produce an adapter method handle which adapts the type of the current method handle to a new type by pairwise argument conversion. |
MethodHandle |
MethodHandles.Lookup.bind(Object receiver,
String name,
MethodType type)
Produce an early-bound method handle for a non-static method. |
MethodHandle |
MethodHandle.bindTo(Object x)
Deprecated. Provisional and unstable; use MethodHandles.insertArguments(java.dyn.MethodHandle, int, java.lang.Object...) . |
static MethodHandle |
MethodHandles.catchException(MethodHandle target,
Class<? extends Throwable> exType,
MethodHandle handler)
PROVISIONAL API, WORK IN PROGRESS: Make a method handle which adapts a target method handle, by running it inside an exception handler. |
static MethodHandle |
MethodHandles.collectArguments(MethodHandle target,
MethodType newType)
PROVISIONAL API, WORK IN PROGRESS: Produce a method handle which adapts the type of the given method handle to a new type, by collecting a series of trailing arguments as elements to a single argument array. |
static MethodHandle |
MethodHandles.convertArguments(MethodHandle target,
MethodType newType)
Produce a method handle which adapts the type of the given method handle to a new type by pairwise argument conversion. |
static MethodHandle |
MethodHandles.dropArguments(MethodHandle target,
int pos,
Class<?>... valueTypes)
|
static MethodHandle |
MethodHandles.dropArguments(MethodHandle target,
int pos,
List<Class<?>> valueTypes)
PROVISIONAL API, WORK IN PROGRESS: Produce a method handle which calls the original method handle, after dropping the given argument(s) at the given position. |
MethodHandle |
CallSite.dynamicInvoker()
PROVISIONAL API, WORK IN PROGRESS: Produce a method handle equivalent to an invokedynamic instruction which has been linked to this call site. |
static MethodHandle |
MethodHandles.dynamicInvoker(CallSite site)
PROVISIONAL API, WORK IN PROGRESS: Produce a method handle equivalent to an invokedynamic instruction which has been linked to the given call site. |
static MethodHandle |
MethodHandles.exactInvoker(MethodType type)
PROVISIONAL API, WORK IN PROGRESS: Produce a method handle which will take a invoke any method handle of the given type. |
static MethodHandle |
MethodHandles.filterArguments(MethodHandle target,
MethodHandle... filters)
PROVISIONAL API, WORK IN PROGRESS: Adapt a target method handle target by pre-processing
one or more of its arguments, each with its own unary filter function,
and then calling the target with each pre-processed argument
replaced by the result of its corresponding filter function. |
MethodHandle |
MethodHandles.Lookup.findConstructor(Class<?> refc,
MethodType type)
Produce a method handle which creates an object and initializes it, using the constructor of the specified type. |
MethodHandle |
MethodHandles.Lookup.findGetter(Class<?> refc,
String name,
Class<?> type)
PROVISIONAL API, WORK IN PROGRESS: Produce a method handle giving read access to a non-static field. |
MethodHandle |
MethodHandles.Lookup.findSetter(Class<?> refc,
String name,
Class<?> type)
PROVISIONAL API, WORK IN PROGRESS: Produce a method handle giving write access to a non-static field. |
MethodHandle |
MethodHandles.Lookup.findSpecial(Class<?> refc,
String name,
MethodType type,
Class<?> specialCaller)
Produce an early-bound method handle for a virtual method, as if called from an invokespecial
instruction from caller . |
MethodHandle |
MethodHandles.Lookup.findStatic(Class<?> refc,
String name,
MethodType type)
Produce a method handle for a static method. |
MethodHandle |
MethodHandles.Lookup.findStaticGetter(Class<?> refc,
String name,
Class<?> type)
PROVISIONAL API, WORK IN PROGRESS: Produce a method handle giving read access to a static field. |
MethodHandle |
MethodHandles.Lookup.findStaticSetter(Class<?> refc,
String name,
Class<?> type)
PROVISIONAL API, WORK IN PROGRESS: Produce a method handle giving write access to a static field. |
MethodHandle |
MethodHandles.Lookup.findVirtual(Class<?> refc,
String name,
MethodType type)
Produce a method handle for a virtual method. |
static MethodHandle |
MethodHandles.foldArguments(MethodHandle target,
MethodHandle combiner)
PROVISIONAL API, WORK IN PROGRESS: Adapt a target method handle target by pre-processing
some of its arguments, and then calling the target with
the result of the pre-processing, plus all original arguments. |
static MethodHandle |
MethodHandles.genericInvoker(MethodType type)
PROVISIONAL API, WORK IN PROGRESS: Produce a method handle which will invoke any method handle of the given type on a standard set of Object type arguments. |
static MethodHandle |
Linkage.getBootstrapMethod(Class callerClass)
Deprecated. |
MethodHandle |
CallSite.getTarget()
Report the current linkage state of the call site. |
static MethodHandle |
MethodHandles.guardWithTest(MethodHandle test,
MethodHandle target,
MethodHandle fallback)
PROVISIONAL API, WORK IN PROGRESS: Make a method handle which adapts a target method handle, by guarding it with a test, a boolean-valued method handle. |
protected MethodHandle |
CallSite.initialTarget()
Deprecated. transitional form defined in EDR but removed in PFD |
protected MethodHandle |
CallSite.initialTarget(Class<?> callerClass,
String name,
MethodType type)
Deprecated. transitional form defined in EDR but removed in PFD |
static MethodHandle |
MethodHandles.insertArgument(MethodHandle target,
int pos,
Object value)
Deprecated. |
static MethodHandle |
MethodHandles.insertArguments(MethodHandle target,
int pos,
Object... values)
PROVISIONAL API, WORK IN PROGRESS: Produce a method handle which calls the original method handle target ,
after inserting the given argument(s) at the given position. |
static MethodHandle |
MethodHandles.permuteArguments(MethodHandle target,
MethodType newType,
int[] reorder)
PROVISIONAL API, WORK IN PROGRESS: Produce a method handle which adapts the calling sequence of the given method handle to a new type, by reordering the arguments. |
static MethodHandle |
MethodHandles.spreadArguments(MethodHandle target,
MethodType newType)
PROVISIONAL API, WORK IN PROGRESS: Produce a method handle which adapts the type of the given method handle to a new type, by spreading the final argument. |
static MethodHandle |
MethodHandles.throwException(Class<?> returnType,
Class<? extends Throwable> exType)
Produce a method handle which will throw exceptions of the given exType . |
MethodHandle |
MethodHandles.Lookup.unreflect(Method m)
PROVISIONAL API, WORK IN PROGRESS: Make a direct method handle to m, if the lookup class has permission. |
MethodHandle |
MethodHandles.Lookup.unreflectConstructor(Constructor c)
PROVISIONAL API, WORK IN PROGRESS: Produce a method handle for a reflected constructor. |
MethodHandle |
MethodHandles.Lookup.unreflectGetter(Field f)
PROVISIONAL API, WORK IN PROGRESS: Produce a method handle giving read access to a reflected field. |
MethodHandle |
MethodHandles.Lookup.unreflectSetter(Field f)
PROVISIONAL API, WORK IN PROGRESS: Produce a method handle giving write access to a reflected field. |
MethodHandle |
MethodHandles.Lookup.unreflectSpecial(Method m,
Class<?> specialCaller)
PROVISIONAL API, WORK IN PROGRESS: Produce a method handle for a reflected method. |
static MethodHandle |
MethodHandles.varargsInvoker(MethodType type,
int objectArgCount)
PROVISIONAL API, WORK IN PROGRESS: Produce a method handle which will invoke any method handle of the given type on a standard set of Object type arguments
and a single trailing Object[] array. |
Modifier and Type | Method and Description | |
---|---|---|
static
|
MethodHandles.asInstance(MethodHandle target,
Class<T> samType)
Produce a wrapper instance of the given "SAM" type which redirects its calls to the given method handle. |
|
static MethodHandle |
MethodHandles.catchException(MethodHandle target,
Class<? extends Throwable> exType,
MethodHandle handler)
PROVISIONAL API, WORK IN PROGRESS: Make a method handle which adapts a target method handle, by running it inside an exception handler. |
|
static MethodHandle |
MethodHandles.collectArguments(MethodHandle target,
MethodType newType)
PROVISIONAL API, WORK IN PROGRESS: Produce a method handle which adapts the type of the given method handle to a new type, by collecting a series of trailing arguments as elements to a single argument array. |
|
static MethodHandle |
MethodHandles.convertArguments(MethodHandle target,
MethodType newType)
Produce a method handle which adapts the type of the given method handle to a new type by pairwise argument conversion. |
|
static MethodHandle |
MethodHandles.dropArguments(MethodHandle target,
int pos,
Class<?>... valueTypes)
|
|
static MethodHandle |
MethodHandles.dropArguments(MethodHandle target,
int pos,
List<Class<?>> valueTypes)
PROVISIONAL API, WORK IN PROGRESS: Produce a method handle which calls the original method handle, after dropping the given argument(s) at the given position. |
|
static MethodHandle |
MethodHandles.filterArguments(MethodHandle target,
MethodHandle... filters)
PROVISIONAL API, WORK IN PROGRESS: Adapt a target method handle target by pre-processing
one or more of its arguments, each with its own unary filter function,
and then calling the target with each pre-processed argument
replaced by the result of its corresponding filter function. |
|
static MethodHandle |
MethodHandles.filterArguments(MethodHandle target,
MethodHandle... filters)
PROVISIONAL API, WORK IN PROGRESS: Adapt a target method handle target by pre-processing
one or more of its arguments, each with its own unary filter function,
and then calling the target with each pre-processed argument
replaced by the result of its corresponding filter function. |
|
static MethodHandle |
MethodHandles.foldArguments(MethodHandle target,
MethodHandle combiner)
PROVISIONAL API, WORK IN PROGRESS: Adapt a target method handle target by pre-processing
some of its arguments, and then calling the target with
the result of the pre-processing, plus all original arguments. |
|
static MethodHandle |
MethodHandles.guardWithTest(MethodHandle test,
MethodHandle target,
MethodHandle fallback)
PROVISIONAL API, WORK IN PROGRESS: Make a method handle which adapts a target method handle, by guarding it with a test, a boolean-valued method handle. |
|
static MethodHandle |
MethodHandles.insertArgument(MethodHandle target,
int pos,
Object value)
Deprecated. |
|
static MethodHandle |
MethodHandles.insertArguments(MethodHandle target,
int pos,
Object... values)
PROVISIONAL API, WORK IN PROGRESS: Produce a method handle which calls the original method handle target ,
after inserting the given argument(s) at the given position. |
|
static Object |
MethodHandles.invoke(MethodHandle target,
Object... arguments)
Deprecated. Alias for MethodHandle.invokeVarargs. |
|
static Object |
MethodHandles.invokeVarargs(MethodHandle target,
Object... arguments)
Deprecated. Alias for MethodHandle.invokeVarargs. |
|
static MethodHandle |
MethodHandles.permuteArguments(MethodHandle target,
MethodType newType,
int[] reorder)
PROVISIONAL API, WORK IN PROGRESS: Produce a method handle which adapts the calling sequence of the given method handle to a new type, by reordering the arguments. |
|
static void |
Linkage.registerBootstrapMethod(Class callerClass,
MethodHandle bootstrapMethod)
Deprecated. Use @ BootstrapMethod annotations instead |
|
void |
ConstantCallSite.setTarget(MethodHandle ignore)
Throw an IllegalArgumentException , because this kind of call site cannot change its target. |
|
void |
CallSite.setTarget(MethodHandle newTarget)
Set the target method of this call site. |
|
static MethodHandle |
MethodHandles.spreadArguments(MethodHandle target,
MethodType newType)
PROVISIONAL API, WORK IN PROGRESS: Produce a method handle which adapts the type of the given method handle to a new type, by spreading the final argument. |
Constructor and Description |
---|
CallSite(MethodHandle target)
Make a blank call site object, possibly equipped with an initial target method handle. |
ConstantCallSite(MethodHandle target)
Create a call site with a permanent target. |
|
Java™ Platform Standard Ed. 7 DRAFT ea-b118 |
|||||||||
PREV NEXT | FRAMES NO FRAMES |
Copyright © 1993, 2010, Oracle Corporation. All rights reserved.