MethodInvocation { public Class<?> getHintedType() { return hintedType; } MethodInvocation(Method method, Object[] args); Class<?> getReturnType(); Class<?> getHintedType(); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void handlesNoArgMethods() throws NoSuchMethodException { Method m = I.class.getMethod("noArg"); MethodInvocation inv = new MethodInvocation(m, null); assertNull(inv.getHintedType()); }
@Test public void handlesVarargHints() throws NoSuchMethodException { Method m = I.class.getMethod("varArg", Class[].class); MethodInvocation inv = new MethodInvocation(m, new Object[][] { new Object[] { String.class }}); assertEquals(inv.getHintedType(), String.class); }