MethodHandles

public class MethodHandles extends Object

Nested Class Summary

class MethodHandles.Lookup  

Public Constructor Summary

Public Method Summary

static MethodHandle
arrayElementGetter(Class<?> arrayClass)
static MethodHandle
arrayElementSetter(Class<?> arrayClass)
static MethodHandle
catchException(MethodHandle target, Class<? extends Throwable> exType, MethodHandle handler)
static MethodHandle
collectArguments(MethodHandle target, int pos, MethodHandle filter)
static MethodHandle
constant(Class<?> type, Object value)
static MethodHandle
dropArguments(MethodHandle target, int pos, Class...<?> valueTypes)
static MethodHandle
dropArguments(MethodHandle target, int pos, List<Class<?>> valueTypes)
static MethodHandle
static MethodHandle
static MethodHandle
filterArguments(MethodHandle target, int pos, MethodHandle... filters)
static MethodHandle
static MethodHandle
static MethodHandle
static MethodHandle
identity(Class<?> type)
static MethodHandle
insertArguments(MethodHandle target, int pos, Object... values)
static MethodHandle
static MethodHandles.Lookup
lookup()
static MethodHandle
permuteArguments(MethodHandle target, MethodType newType, int... reorder)
static MethodHandles.Lookup
static <T extends Member> T
reflectAs(Class<T> expected, MethodHandle target)
static MethodHandle
spreadInvoker(MethodType type, int leadingArgCount)
static MethodHandle
throwException(Class<?> returnType, Class<? extends Throwable> exType)

Inherited Method Summary

Public Constructors

public MethodHandles ()

Public Methods

public static MethodHandle arrayElementGetter (Class<?> arrayClass)

Parameters
arrayClass

public static MethodHandle arrayElementSetter (Class<?> arrayClass)

Parameters
arrayClass

public static MethodHandle catchException (MethodHandle target, Class<? extends Throwable> exType, MethodHandle handler)

Parameters
target
exType
handler

public static MethodHandle collectArguments (MethodHandle target, int pos, MethodHandle filter)

Parameters
target
pos
filter

public static MethodHandle constant (Class<?> type, Object value)

Parameters
type
value

public static MethodHandle dropArguments (MethodHandle target, int pos, Class...<?> valueTypes)

Parameters
target
pos
valueTypes

public static MethodHandle dropArguments (MethodHandle target, int pos, List<Class<?>> valueTypes)

Parameters
target
pos
valueTypes

public static MethodHandle exactInvoker (MethodType type)

Parameters
type

public static MethodHandle explicitCastArguments (MethodHandle target, MethodType newType)

Parameters
target
newType

public static MethodHandle filterArguments (MethodHandle target, int pos, MethodHandle... filters)

Parameters
target
pos
filters

public static MethodHandle filterReturnValue (MethodHandle target, MethodHandle filter)

Parameters
target
filter

public static MethodHandle foldArguments (MethodHandle target, MethodHandle combiner)

Parameters
target
combiner

public static MethodHandle guardWithTest (MethodHandle test, MethodHandle target, MethodHandle fallback)

Parameters
test
target
fallback

public static MethodHandle identity (Class<?> type)

Parameters
type

public static MethodHandle insertArguments (MethodHandle target, int pos, Object... values)

Parameters
target
pos
values

public static MethodHandle invoker (MethodType type)

Parameters
type

public static MethodHandles.Lookup lookup ()

public static MethodHandle permuteArguments (MethodHandle target, MethodType newType, int... reorder)

Parameters
target
newType
reorder

public static MethodHandles.Lookup publicLookup ()

public static T reflectAs (Class<T> expected, MethodHandle target)

Parameters
expected
target

public static MethodHandle spreadInvoker (MethodType type, int leadingArgCount)

Parameters
type
leadingArgCount

public static MethodHandle throwException (Class<?> returnType, Class<? extends Throwable> exType)

Parameters
returnType
exType