# Class MethodHandles

java.lang.Object
java.lang.invoke.MethodHandles

public abstract class MethodHandles extends Object

##### Deprecated

these classes are used internally for Lambda compatibility

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `MethodHandles.Lookup`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MethodHandles()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static MethodHandle`
  `arrayElementGetter(Class<?> a)`
  `static MethodHandle`
  `arrayElementSetter(Class<?> a)`
  `static MethodHandle`
  `catchException(MethodHandle a, Class<? extends Throwable> b, MethodHandle c)`
  `static MethodHandle`
  `collectArguments(MethodHandle a, int b, MethodHandle c)`
  `static MethodHandle`
  `constant(Class<?> a, Object b)`
  `static MethodHandle`
  `dropArguments(MethodHandle a, int b, Class<?>... c)`
  `static MethodHandle`
  `dropArguments(MethodHandle a, int b, List<Class<?>> c)`
  `static MethodHandle`
  `exactInvoker(MethodType a)`
  `static MethodHandle`
  `explicitCastArguments(MethodHandle a, MethodType b)`
  `static MethodHandle`
  `filterArguments(MethodHandle a, int b, MethodHandle... c)`
  `static MethodHandle`
  `filterReturnValue(MethodHandle a, MethodHandle b)`
  `static MethodHandle`
  `foldArguments(MethodHandle a, MethodHandle b)`
  `static MethodHandle`
  `guardWithTest(MethodHandle a, MethodHandle b, MethodHandle c)`
  `static MethodHandle`
  `identity(Class<?> a)`
  `static MethodHandle`
  `insertArguments(MethodHandle a, int b, Object... c)`
  `static MethodHandle`
  `invoker(MethodType a)`
  `static MethodHandles.Lookup`
  `lookup()`
  `static MethodHandle`
  `permuteArguments(MethodHandle a, MethodType b, int... c)`
  `static MethodHandles.Lookup`
  `publicLookup()`
  `static <T> T`
  `reflectAs(Class<T> a, MethodHandle b)`
  `static MethodHandle`
  `spreadInvoker(MethodType a, int b)`
  `static MethodHandle`
  `throwException(Class<?> a, Class<? extends Throwable> b)`

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### MethodHandles

    public MethodHandles()

- ## Method Details

  - ### lookup

    public static MethodHandles.Lookup lookup()

  - ### publicLookup

    public static MethodHandles.Lookup publicLookup()

  - ### reflectAs

    public static <T> T reflectAs(Class<T> a, MethodHandle b)

  - ### arrayElementGetter

    public static MethodHandle arrayElementGetter(Class<?> a) throws IllegalArgumentException
    Throws:
      `IllegalArgumentException`

  - ### arrayElementSetter

    public static MethodHandle arrayElementSetter(Class<?> a) throws IllegalArgumentException
    Throws:
      `IllegalArgumentException`

  - ### spreadInvoker

    public static MethodHandle spreadInvoker(MethodType a, int b)

  - ### exactInvoker

    public static MethodHandle exactInvoker(MethodType a)

  - ### invoker

    public static MethodHandle invoker(MethodType a)

  - ### explicitCastArguments

    public static MethodHandle explicitCastArguments(MethodHandle a, MethodType b)

  - ### permuteArguments

    public static MethodHandle permuteArguments(MethodHandle a, MethodType b, int... c)

  - ### constant

    public static MethodHandle constant(Class<?> a, Object b)

  - ### identity

    public static MethodHandle identity(Class<?> a)

  - ### insertArguments

    public static MethodHandle insertArguments(MethodHandle a, int b, Object... c)

  - ### dropArguments

    public static MethodHandle dropArguments(MethodHandle a, int b, List<Class<?>> c)

  - ### dropArguments

    public static MethodHandle dropArguments(MethodHandle a, int b, Class<?>... c)

  - ### filterArguments

    public static MethodHandle filterArguments(MethodHandle a, int b, MethodHandle... c)

  - ### collectArguments

    public static MethodHandle collectArguments(MethodHandle a, int b, MethodHandle c)

  - ### filterReturnValue

    public static MethodHandle filterReturnValue(MethodHandle a, MethodHandle b)

  - ### foldArguments

    public static MethodHandle foldArguments(MethodHandle a, MethodHandle b)

  - ### guardWithTest

    public static MethodHandle guardWithTest(MethodHandle a, MethodHandle b, MethodHandle c)

  - ### catchException

    public static MethodHandle catchException(MethodHandle a, Class<? extends Throwable> b, MethodHandle c)

  - ### throwException

    public static MethodHandle throwException(Class<?> a, Class<? extends Throwable> b)