Added support for all primitive types. No arrays yet. That seems more complicated
This commit is contained in:
parent
10ffe459e0
commit
d926ed2adc
1 changed files with 8 additions and 1 deletions
|
|
@ -8,7 +8,14 @@ public class TypeMapper {
|
||||||
private static final Map<Class<?>, String> MAP = new ConcurrentHashMap<>();
|
private static final Map<Class<?>, String> MAP = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
MAP.put(byte.class, "B");
|
||||||
|
MAP.put(char.class, "C");
|
||||||
|
MAP.put(double.class, "D");
|
||||||
|
MAP.put(float.class, "F");
|
||||||
MAP.put(int.class, "I");
|
MAP.put(int.class, "I");
|
||||||
|
MAP.put(long.class, "J");
|
||||||
|
MAP.put(short.class, "S");
|
||||||
|
MAP.put(boolean.class, "Z");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String map(Class<?> type) {
|
public static String map(Class<?> type) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue