Ejemplo n.º 1
0
 @Test
 public void testCallSite() throws Exception {
   assertThat(JavaType.CALL_SITE.getTypeStub().getName(), is("java.lang.invoke.CallSite"));
   assertThat(
       JavaType.CALL_SITE.getTypeStub().getModifiers(),
       is(Opcodes.ACC_PUBLIC | Opcodes.ACC_ABSTRACT));
   assertThat(
       JavaType.CALL_SITE.getTypeStub().getSuperClass(), is(TypeDescription.Generic.OBJECT));
   assertThat(JavaType.CALL_SITE.getTypeStub().getInterfaces().size(), is(0));
 }
Ejemplo n.º 2
0
 @Test
 @JavaVersionRule.Enforce(7)
 public void testJava7Types() throws Exception {
   assertThat(JavaType.METHOD_HANDLE.load(), notNullValue(Class.class));
   assertThat(JavaType.METHOD_TYPE.load(), notNullValue(Class.class));
   assertThat(JavaType.METHOD_HANDLES_LOOKUP.load(), notNullValue(Class.class));
   assertThat(JavaType.CALL_SITE.load(), notNullValue(Class.class));
 }