Here you can find the source of invoke(MethodHandle methodHandle, Object... params)
public static <T> T invoke(MethodHandle methodHandle, Object... params)
//package com.java2s; //License from project: Open Source License import java.lang.invoke.MethodHandle; public class Main { /** Wraps any non-runtime exceptions with a runtime exception */ public static <T> T invoke(MethodHandle methodHandle, Object... params) { try {/*from ww w.j a v a2 s . c om*/ return (T) methodHandle.invokeWithArguments(params); } catch (RuntimeException e) { throw e; } catch (Throwable throwable) { throw new RuntimeException(throwable); } } }