All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.litongjava.tio.boot.utils.ApplyFunctionUtils Maven / Gradle / Ivy

There is a newer version: 1.8.6
Show newest version
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 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