net.ttddyy.dsproxy.proxy.MethodUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of datasource-proxy Show documentation
Show all versions of datasource-proxy Show documentation
Provide a datasource proxy that can inject your own logic into all queries.
package net.ttddyy.dsproxy.proxy;
import java.lang.reflect.Method;
import java.lang.reflect.InvocationTargetException;
/**
* @author Tadaya Tsuyukubo
*/
public class MethodUtils {
public static Object proceedExecution(Method method, Object target, Object[] args) throws Throwable {
try {
return method.invoke(target, args);
}
catch (InvocationTargetException ex) {
throw ex.getTargetException();
}
}
}