@Test(expected = IllegalArgumentException.class) public void invoke_without_parameters() { MyClass<Integer> myClass = new MyClass<>(); getMethodDescriptor().invoke(myClass); }
public Object invoke(Object object, Object... args) { try { return method.invoke(object, args); } catch (IllegalAccessException | InvocationTargetException e) { throw new ReflectionException(toString(), e); } }
MethodDescriptor extends AbstractMethodDescriptor<Method> implements StaticExecutable { public Object invoke(Object object, Object... args) { try { return method.invoke(object, args); } catch (IllegalAccessException | InvocationTargetException e) { throw new ReflectionException(toString(), e); } } }
MethodDescriptor extends AbstractMethodDescriptor<Method> implements StaticExecutable { public Object invoke(Object object, Object... args) { try { return method.invoke(object, args); } catch (IllegalAccessException | InvocationTargetException e) { throw new ReflectionException(toString(), e); } } MethodDescriptor(TypeDescriptor declaringType, Method method); }
MethodDescriptor extends AbstractMethodDescriptor<Method> implements StaticExecutable { public Object invoke(Object object, Object... args) { try { return method.invoke(object, args); } catch (IllegalAccessException | InvocationTargetException e) { throw new ReflectionException(toString(), e); } } MethodDescriptor(TypeDescriptor declaringType, Method method); TypeDescriptor getReturnType(); Class<?> getRawReturnType(); List<ParameterDescriptor> getParameters(); int getParameterCount(); String getName(); List<Class<?>> getParameterTypes(); @Override Object invokeStatic(Object... args); Object invoke(Object object, Object... args); @Override boolean equals(Object obj); @Override int hashCode(); boolean applies(TypeDescriptor typeDescriptor); String toString(); @Override Method getElement(); }
MethodDescriptor extends AbstractMethodDescriptor<Method> implements StaticExecutable { public Object invoke(Object object, Object... args) { try { return method.invoke(object, args); } catch (IllegalAccessException | InvocationTargetException e) { throw new ReflectionException(toString(), e); } } MethodDescriptor(TypeDescriptor declaringType, Method method); TypeDescriptor getReturnType(); Class<?> getRawReturnType(); List<ParameterDescriptor> getParameters(); int getParameterCount(); String getName(); List<Class<?>> getParameterTypes(); @Override Object invokeStatic(Object... args); Object invoke(Object object, Object... args); @Override boolean equals(Object obj); @Override int hashCode(); boolean applies(TypeDescriptor typeDescriptor); String toString(); @Override Method getElement();  }