Esempio n. 1
0
 private static <I> void invokeOnInjectee(Invokable<? super I, Object> method, I injectee) {
   try {
     method.invoke(injectee);
   } catch (InvocationTargetException ie) {
     throw propagate(ie.getTargetException());
   } catch (IllegalAccessException e) {
     throw propagate(e);
   }
 }
Esempio n. 2
0
  @Test
  public void testTypeToken()
      throws NoSuchMethodException, SecurityException, InvocationTargetException,
          IllegalAccessException {

    TypeToken<TypeTokenTest> token = TypeToken.of(TypeTokenTest.class);
    Invokable<TypeTokenTest, ?> invokable =
        token.method(TypeTokenTest.class.getMethod("helloWorld"));
    invokable.invoke(this);
  }