public <T> T forwardTo(final Class<T> type) {
return proxifier.proxify(type, new MethodInvocation<T>() {
public Object intercept(T proxy, Method method, Object[] args, SuperMethod superMethod) {
try {
logger.debug("Executing {}", Stringnifier.simpleNameFor(method));
ResourceMethod old = methodInfo.getResourceMethod();
methodInfo.setResourceMethod(DefaultResourceMethod.instanceFor(type, method));
Object result = method.invoke(container.instanceFor(type), args);
methodInfo.setResourceMethod(old);
Type returnType = method.getGenericReturnType();