Package java.lang.invoke

Examples of java.lang.invoke.CallSite.type()


  }

  @Test
  public void check_bootstrap() throws Throwable {
    CallSite callSite = ClosureReferenceSupport.bootstrap(lookup(), "to_list", methodType(MethodHandle.class), KLASS, 2, 0);
    assertThat(callSite.type(), is(methodType(MethodHandle.class)));

    Object result = callSite.dynamicInvoker().invoke();
    assertThat(result, instanceOf(MethodHandle.class));

    MethodHandle handle = (MethodHandle) result;
View Full Code Here


  }

  @Test
  public void check_bootstrap_varargs() throws Throwable {
    CallSite callSite = ClosureReferenceSupport.bootstrap(lookup(), "concat", methodType(MethodHandle.class), KLASS, 0, 1);
    assertThat(callSite.type(), is(methodType(MethodHandle.class)));

    Object result = callSite.dynamicInvoker().invoke();
    assertThat(result, instanceOf(MethodHandle.class));

    MethodHandle handle = (MethodHandle) result;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.