net.ttddyy.dsproxy.proxy.ReflectionUtils 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;
/**
* @author Tadaya Tsuyukubo
* @since 1.4.6
*/
public class ReflectionUtils {
public static Method getMethodIfAvailable(Class> clazz, String name, Class... parameterTypes) {
try {
return clazz.getMethod(name, parameterTypes);
} catch (NoSuchMethodException e) {
return null;
}
}
}