MethodHandle handle = Binder
.from(String.class, Object.class, Integer.class, Float.class)
.convert(target.type().returnType(), target.type().parameterArray())
.invoke(target);
assertEquals(MethodType.methodType(String.class, Object.class, Integer.class, Float.class), handle.type());
assertEquals(null, (String)handle.invokeExact((Object)"foo", (Integer)5, (Float)5.0f));
}
@Test
public void testCast() throws Throwable {