|
|
|
@ -89,7 +89,7 @@ public abstract class ClassUtils {
@@ -89,7 +89,7 @@ public abstract class ClassUtils {
|
|
|
|
|
* Map with primitive type name as key and corresponding primitive |
|
|
|
|
* type as value, for example: "int" -> "int.class". |
|
|
|
|
*/ |
|
|
|
|
private static final Map<String, Class<?>> primitiveTypeNameMap = new HashMap<String, Class<?>>(16); |
|
|
|
|
private static final Map<String, Class<?>> primitiveTypeNameMap = new HashMap<String, Class<?>>(32); |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Map with common "java.lang" class name as key and corresponding Class as value. |
|
|
|
@ -113,11 +113,12 @@ public abstract class ClassUtils {
@@ -113,11 +113,12 @@ public abstract class ClassUtils {
|
|
|
|
|
registerCommonClasses(entry.getKey()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Set<Class<?>> primitiveTypes = new HashSet<Class<?>>(16); |
|
|
|
|
Set<Class<?>> primitiveTypes = new HashSet<Class<?>>(32); |
|
|
|
|
primitiveTypes.addAll(primitiveWrapperTypeMap.values()); |
|
|
|
|
primitiveTypes.addAll(Arrays.asList( |
|
|
|
|
boolean[].class, byte[].class, char[].class, double[].class, |
|
|
|
|
float[].class, int[].class, long[].class, short[].class)); |
|
|
|
|
primitiveTypes.add(void.class); |
|
|
|
|
for (Class<?> primitiveType : primitiveTypes) { |
|
|
|
|
primitiveTypeNameMap.put(primitiveType.getName(), primitiveType); |
|
|
|
|
} |
|
|
|
|