@@ -0,0 +1,1211 @@
+package com.github.zhongl.hs4j.kit.util;%0A%0Aimport java.lang.reflect.*;%0A%0A/**%0A * %7B@link ClassUtils%7D%0A * %0A * @author %3Ca href=mailto:zhong.lunfu@gmail.com%3Ezhongl%3C/a%3E%0A * @created 2011-6-5%0A * %0A */%0Apublic class ClassUtils %7B%0A  public static void assertMethodReturnType(Method method, Class%3C?%3E returnType) %7B%0A    if (method.getReturnType().equals(returnType)) return;%0A    throw new IllegalArgumentException(returnType + %22 should return by method: %22 + method);%0A  %7D%0A%0A  @SuppressWarnings(%22unchecked%22)%0A  public static %3CT%3E Class%3CT%3E getOnlyOneTypeArgumentClassFrom(ParameterizedType parameterizedType) %7B%0A    final Type%5B%5D actualTypeArguments = parameterizedType.getActualTypeArguments();%0A    if (actualTypeArguments.length %3E 1)%0A      throw new IllegalArgumentException(parameterizedType + %22 has more than one type arguments%22);%0A    return (Class%3CT%3E) actualTypeArguments%5B0%5D;%0A  %7D%0A%0A  public static boolean isIterable(Class%3C?%3E rawType) %7B%0A    return Iterable.class.isAssignableFrom(rawType);%0A  %7D%0A%0A  public static boolean isParameterizedType(Type type) %7B%0A    return type instanceof ParameterizedType;%0A  %7D%0A%0A  public static ParameterizedType parameterized(Type type) %7B%0A    return (ParameterizedType) type;%0A  %7D%0A%0A  private ClassUtils() %7B%7D%0A%7D%0A

Add pull requests from zhongl