获取指定类型中的特定method返回类型
  public static Class<?> getMethodReturnType(Class<?> clazz, String name) {
  if (clazz==null || name==null || name.isEmpty()) {
  return null;
  }
  name = name.toLowerCase();
  Class<?> returnType = null;
  for (Method method : clazz.getDeclaredMethods()) {
  if (method.getName().equals(name)) {
  returnType = method.getReturnType();
  break;
  }
  }
  return returnType;
  }
  方法ReflectionUtil#getMethodReturnType(Class<?>, String)可以帮助你根据对象类型和方法名称获取其所对应的方法返回类型。ReflectionUtil#getMethodReturnType(Class<?>, String)利用Class#getDeclaredMethods()并以java.lang.reflect.Method#getName()比对方法名称,返回找到的方法的返回值类型(Method#getReturnType()).
  根据字符串标示获取枚举常量
  @SuppressWarnings({ "unchecked", "rawtypes" })
  public static Object getEnumConstant(Class<?> clazz, String name) {
  if (clazz==null || name==null || name.isEmpty()) {
  return null;
  }
  return Enum.valueOf((Class<Enum>)clazz, name);
  }
  方法ReflectionUtil#getEnumConstant(Class<?>, String)为利用制定的枚举类型和枚举名称获取其对象。这里的名称必须和存在的枚举常量匹配。