@@ -0,0 +1,1225 @@
+package org.nutz.lang.util;%0D%0A%0D%0Aimport java.lang.reflect.ParameterizedType;%0D%0Aimport java.lang.reflect.Type;%0D%0Aimport java.util.List;%0D%0Aimport java.util.Map;%0D%0A%0D%0Apublic class NutParameterizedType implements ParameterizedType %7B%0D%0A%09%0D%0A%09public static Type list(Type clazz)%7B%0D%0A%09%09NutParameterizedType type = new NutParameterizedType();%0D%0A%09%09type.rawType = List.class;%0D%0A%09%09type.setActualTypeArguments(clazz);%0D%0A%09%09return type;%0D%0A%09%7D%0D%0A%09%0D%0A%09public static Type map(Type key, Type value)%7B%0D%0A%09%09NutParameterizedType type = new NutParameterizedType();%0D%0A%09%09type.rawType = Map.class;%0D%0A%09%09type.setActualTypeArguments(key,value);%0D%0A%09%09return type;%0D%0A%09%7D%0D%0A%09%0D%0A%09private Type%5B%5D actualTypeArguments;%0D%0A%09%0D%0A%09private Type rawType;%0D%0A%09%0D%0A%09private Type ownerType;%0D%0A%0D%0A%09@Override%0D%0A%09public Type%5B%5D getActualTypeArguments() %7B%0D%0A%09%09return actualTypeArguments;%0D%0A%09%7D%0D%0A%0D%0A%09@Override%0D%0A%09public Type getRawType() %7B%0D%0A%09%09return rawType;%0D%0A%09%7D%0D%0A%0D%0A%09@Override%0D%0A%09public Type getOwnerType() %7B%0D%0A%09%09return ownerType;%0D%0A%09%7D%0D%0A%0D%0A%09public void setActualTypeArguments(Type...actualTypeArguments) %7B%0D%0A%09%09this.actualTypeArguments = actualTypeArguments;%0D%0A%09%7D%0D%0A%09%0D%0A%09public void setOwnerType(Type ownerType) %7B%0D%0A%09%09this.ownerType = ownerType;%0D%0A%09%7D%0D%0A%09%0D%0A%09public void setRawType(Type rawType) %7B%0D%0A%09%09this.rawType = rawType;%0D%0A%09%7D%0D%0A%7D%0D%0A

添加NutParameterizedType,实现直接生成泛型的List/Map