Package | Description |
---|---|
java.lang.invoke |
The
java.lang.invoke package contains dynamic language support provided directly by
the Java core class libraries and virtual machine. |
Modifier and Type | Method and Description |
---|---|
MethodHandle |
MethodHandle.asCollector(Class<?> arrayClass,
int collectCount)
Returns a MethodHandle that collects the requested incoming arguments, which must match the
types in MethodType incomingArgs, into an array of arrayClass, called T.
|
MethodHandle |
MethodHandle.asSpreader(Class<?> arrayClass,
int spreadCount)
Produce a MethodHandle that has an array of type arrayClass as its last argument and replaces the
array with spreadCount arguments from the array before calling the original MethodHandle.
|
static MethodHandle |
MethodHandles.explicitCastArguments(MethodHandle handle,
MethodType type)
Produce an adapter that converts the incoming arguments from type to the underlying MethodHandle's type
and converts the return value as required.
|
Object |
MethodHandle.invoke(Object... args)
Invoke the receiver MethodHandle against the supplied arguments.
|
Object |
MethodHandle.invokeExact(Object... args)
Invoke the receiver MethodHandle against the supplied arguments.
|
Object |
MethodHandle.invokeWithArguments(List<?> args)
Helper method to call
MethodHandle.invokeWithArguments(Object[]) . |
Object |
MethodHandle.invokeWithArguments(Object... args)
Invoke the MethodHandle using an Object[] of arguments.
|
void |
VolatileCallSite.setTarget(MethodHandle nextTarget)
Set the CallSite's target to be nextTarget.
|
abstract void |
CallSite.setTarget(MethodHandle nextTarget)
Set the CallSite's target to be nextTarget.
|
Constructor and Description |
---|
ConstantCallSite(MethodType targetType,
MethodHandle hook)
Create a ConstantCallSite and assign the hook MethodHandle's result to its permanent target.
|
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, 2025, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.