# Class MethodHandles

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

public abstract class MethodHandles extends java.lang.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(java.lang.Class<?> a)`
  `static MethodHandle`
  `arrayElementSetter(java.lang.Class<?> a)`
  `static MethodHandle`
  `catchException(MethodHandle a, java.lang.Class<? extends Throwable> b, MethodHandle c)`
  `static MethodHandle`
  `collectArguments(MethodHandle a, int b, MethodHandle c)`
  `static MethodHandle`
  `constant(java.lang.Class<?> a, java.lang.Object b)`
  `static MethodHandle`
  `dropArguments(MethodHandle a, int b, java.lang.Class<?>... c)`
  `static MethodHandle`
  `dropArguments(MethodHandle a, int b, List<java.lang.Class<?>> c)`
  `static MethodHandle`
  `exactInvoker(java.lang.invoke.MethodType a)`
  `static MethodHandle`
  `explicitCastArguments(MethodHandle a, java.lang.invoke.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(java.lang.Class<?> a)`
  `static MethodHandle`
  `insertArguments(MethodHandle a, int b, java.lang.Object... c)`
  `static MethodHandle`
  `invoker(java.lang.invoke.MethodType a)`
  `static MethodHandles.Lookup`
  `lookup()`
  `static MethodHandle`
  `permuteArguments(MethodHandle a, java.lang.invoke.MethodType b, int... c)`
  `static MethodHandles.Lookup`
  `publicLookup()`
  `static <T> T`
  `reflectAs(java.lang.Class<T> a, MethodHandle b)`
  `static MethodHandle`
  `spreadInvoker(java.lang.invoke.MethodType a, int b)`
  `static MethodHandle`
  `throwException(java.lang.Class<?> a, java.lang.Class<? extends Throwable> b)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, 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(java.lang.Class<T> a, MethodHandle b)

  - ### arrayElementGetter

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

  - ### arrayElementSetter

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

  - ### spreadInvoker

    public static MethodHandle spreadInvoker(java.lang.invoke.MethodType a, int b)

  - ### exactInvoker

    public static MethodHandle exactInvoker(java.lang.invoke.MethodType a)

  - ### invoker

    public static MethodHandle invoker(java.lang.invoke.MethodType a)

  - ### explicitCastArguments

    public static MethodHandle explicitCastArguments(MethodHandle a, java.lang.invoke.MethodType b)

  - ### permuteArguments

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

  - ### constant

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

  - ### identity

    public static MethodHandle identity(java.lang.Class<?> a)

  - ### insertArguments

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

  - ### dropArguments

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

  - ### dropArguments

    public static MethodHandle dropArguments(MethodHandle a, int b, java.lang.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, java.lang.Class<? extends Throwable> b, MethodHandle c)

  - ### throwException

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