com.litongjava.tio.boot.utils.ApplyFunctionUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tio-boot Show documentation
Show all versions of tio-boot Show documentation
Java High Performance Web Development Framework
package com.litongjava.tio.boot.utils;
import java.lang.reflect.Method;
import com.litongjava.tio.http.server.handler.IHttpRequestFunction;
public class ApplyFunctionUtils {
public static Method getMethod(@SuppressWarnings("rawtypes") Class extends IHttpRequestFunction> clazz) {
// 通过反射获取函数的参数类型
Method method = null;
try {
method = clazz.getDeclaredMethod("handle", Object.class);
} catch (NoSuchMethodException | SecurityException e) {
e.printStackTrace();
return null;
}
return method;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy