MethodType |
MethodType.appendParameterTypes(Class<?>... classes) |
Returns a MethodType with the additional class types appended to the end.
|
MethodType |
MethodType.appendParameterTypes(List<Class<?>> classes) |
Returns a MethodType with the additional class types appended to the end.
|
static MethodHandle |
MethodHandles.arrayConstructor(Class<?> arrayType) |
Return a MethodHandle that produces an array of the requested type with the passed-in length.
|
static MethodHandle |
MethodHandles.arrayLength(Class<?> arrayType) |
Return a MethodHandle that fetches the length from the passed-in array.
|
MethodHandle |
MethodHandle.asCollector(int collectPosition,
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.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.
|
static MethodHandle |
MethodHandles.catchException(MethodHandle tryHandle,
Class<? extends Throwable> throwableClass,
MethodHandle catchHandle) |
Produce a MethodHandle that implements a try-catch block.
|
static MethodHandle |
MethodHandles.collectArguments(MethodHandle target,
int pos,
MethodHandle filter) |
Produce a MethodHandle that preprocesses some of the arguments by calling the filter handle.
|
static MethodHandle |
MethodHandles.constant(Class<?> returnType,
Object constantValue) |
Create a MethodHandle that returns the constantValue on each invocation.
|
static MethodHandle |
MethodHandles.countedLoop(MethodHandle loopCountHandle,
MethodHandle initHandle,
MethodHandle bodyHandle) |
Produce a loop handle that executes a given number of iterations.
|
static MethodHandle |
MethodHandles.countedLoop(MethodHandle startHandle,
MethodHandle endHandle,
MethodHandle initHandle,
MethodHandle bodyHandle) |
Produce a loop handle that iterates over a range of numbers by specifying the start value
and the end value of the loop counter.
|
Class<?> |
MethodHandles.Lookup.defineClass(byte[] classBytes) |
Return a class object with the same class loader, the same package and
the same protection domain as the lookup's lookup class.
|
static MethodHandle |
MethodHandles.doWhileLoop(MethodHandle initHandle,
MethodHandle bodyHandle,
MethodHandle predHandle) |
Produce a loop handle that wraps an initializer, a loop body and a predicate to execute a do-while loop.
|
static MethodHandle |
MethodHandles.empty(MethodType targetMethodType) |
Produces a constant method handle that ignores arguments and returns the default value
for the return type of the requested MethodType.
|
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.
|
static MethodHandle |
MethodHandles.filterArguments(MethodHandle handle,
int startPosition,
MethodHandle... filters) |
Produce a MethodHandle that adapts its arguments using the filter methodhandles before calling the underlying handle.
|
static MethodHandle |
MethodHandles.filterReturnValue(MethodHandle handle,
MethodHandle filter) |
Return a MethodHandle that will adapt the return value of handle by running the filter
on it and returning the result of the filter.
|
MethodHandle |
MethodHandles.Lookup.findGetter(Class<?> clazz,
String fieldName,
Class<?> fieldType) |
Return a MethodHandle that provides read access to a field.
|
MethodHandle |
MethodHandles.Lookup.findSetter(Class<?> clazz,
String fieldName,
Class<?> fieldType) |
Return a MethodHandle that provides write access to a field.
|
MethodHandle |
MethodHandles.Lookup.findSpecial(Class<?> clazz,
String methodName,
MethodType type,
Class<?> specialToken) |
Return a MethodHandle bound to a specific-implementation of a virtual method, as if created by an invokespecial bytecode
using the class specialToken.
|
MethodHandle |
MethodHandles.Lookup.findStaticGetter(Class<?> clazz,
String fieldName,
Class<?> fieldType) |
Return a MethodHandle that provides read access to a field.
|
MethodHandle |
MethodHandles.Lookup.findStaticSetter(Class<?> clazz,
String fieldName,
Class<?> fieldType) |
Return a MethodHandle that provides write access to a field.
|
static MethodHandle |
MethodHandles.foldArguments(MethodHandle handle,
int foldPosition,
MethodHandle preprocessor) |
Produce a MethodHandle that preprocesses some of the arguments by calling the preprocessor handle.
|
static MethodHandle |
MethodHandles.foldArguments(MethodHandle handle,
MethodHandle preprocessor) |
Produce a MethodHandle that preprocesses some of the arguments by calling the preprocessor handle.
|
static MethodHandle |
MethodHandles.guardWithTest(MethodHandle guard,
MethodHandle trueTarget,
MethodHandle falseTarget) |
Produce a MethodHandle that implements an if-else block.
|
static MethodHandle |
MethodHandles.identity(Class<?> classType) |
Produce a MethodHandle that acts as an identity function.
|
Object |
MethodHandle.invokeWithArguments(List<?> args) |
|
static MethodHandle |
MethodHandles.iteratedLoop(MethodHandle iteratorHandle,
MethodHandle initHandle,
MethodHandle bodyHandle) |
Produce a loop handle that iterates over a range of values produced by an Iterator<T>
Loop variables are updated by the return values of the corresponding step handles
(including the loop body) in each iteration.
|
static MethodHandle |
MethodHandles.permuteArguments(MethodHandle handle,
MethodType permuteType,
int... permute) |
Produce a MethodHandle that will permute the incoming arguments according to the
permute array.
|
static MethodHandles.Lookup |
MethodHandles.privateLookupIn(Class<?> targetClass,
MethodHandles.Lookup callerLookup) |
Return a MethodHandles.Lookup object with full capabilities including the access
to the private members in the requested class
|
static <T extends Member> T |
MethodHandles.reflectAs(Class<T> expected,
MethodHandle target) |
Gets the underlying Member of the provided target MethodHandle.
|
MethodHandleInfo |
MethodHandles.Lookup.revealDirect(MethodHandle target) |
Cracks a MethodHandle, which allows access to its symbolic parts.
|
abstract void |
CallSite.setTarget(MethodHandle nextTarget) |
Set the CallSite's target to be nextTarget.
|
void |
VolatileCallSite.setTarget(MethodHandle nextTarget) |
Set the CallSite's target to be nextTarget.
|
static MethodHandle |
MethodHandles.spreadInvoker(MethodType type,
int fixedArgCount) |
Return a MethodHandle that is able to invoke a MethodHandle of type as though by
invoke after spreading the final Object[] parameter.
|
static void |
MutableCallSite.syncAll(MutableCallSite[] sites) |
Forces the current target MethodHandle of each of the MutableCallSites in the sites array to be seen by all threads.
|
static MethodHandle |
MethodHandles.tryFinally(MethodHandle tryHandle,
MethodHandle finallyHandle) |
Produce a MethodHandle that implements a try-finally block.
|
static MethodHandle |
MethodHandles.whileLoop(MethodHandle initHandle,
MethodHandle predHandle,
MethodHandle bodyHandle) |
Produce a loop handle that wraps an initializer, a loop body and a predicate to execute a while loop.
|
static MethodHandle |
MethodHandles.zero(Class<?> targetType) |
Produces a constant method handle with the default value for the requested target type.
|