Handle TypeVariable in simpleName().

git-svn-id: https://samskivert.googlecode.com/svn/trunk@2994 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
samskivert
2011-04-02 02:00:45 +00:00
parent cd0d699c77
commit cab1a00aac
@@ -24,6 +24,7 @@ import java.lang.reflect.Field;
import java.lang.reflect.GenericArrayType;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.lang.reflect.TypeVariable;
import java.lang.reflect.WildcardType;
/**
@@ -89,6 +90,9 @@ public class GenUtil
}
return buf.toString();
} else if (type instanceof TypeVariable) {
return ((TypeVariable)type).getName();
} else {
throw new IllegalArgumentException("Can't generate simple name [type=" + type +
", tclass=" + StringUtil.shortClassName(type) + "]");