Handle TypeVariable in simpleName().
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2994 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -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) + "]");
|
||||
|
||||
Reference in New Issue
Block a user