public class KsonTypeMapper extends Object
| Modifier and Type | Field and Description |
|---|---|
protected DateFormat |
dateTimeInstance |
static Object |
NULL_LITERAL |
protected HashMap<Class,String> |
reverseTypeMap |
protected HashMap<String,Class> |
typeMap |
protected boolean |
useSimplClzName |
| Constructor and Description |
|---|
KsonTypeMapper() |
| Modifier and Type | Method and Description |
|---|---|
Object |
coerceReading(Class type,
Object readObject)
map given Object to a target type.
|
DateFormat |
getDateTimeInstance() |
String |
getStringForType(Class<? extends Object> aClass) |
Class |
getType(String type) |
boolean |
isUseSimplClzName() |
KsonTypeMapper |
map(Class... c) |
KsonTypeMapper |
map(Object... stringAndClasses) |
KsonTypeMapper |
map(String name,
Class c) |
Object |
mapLiteral(String type) |
void |
setDateTimeInstance(DateFormat dateTimeInstance) |
void |
setUseSimplClzName(boolean useSimplClzName) |
public static final Object NULL_LITERAL
protected boolean useSimplClzName
protected DateFormat dateTimeInstance
public KsonTypeMapper map(String name, Class c)
public KsonTypeMapper map(Object... stringAndClasses)
public KsonTypeMapper map(Class... c)
public boolean isUseSimplClzName()
public void setUseSimplClzName(boolean useSimplClzName)
public Object coerceReading(Class type, Object readObject)
type - - of target fieldreadObject - - object read from stringpublic DateFormat getDateTimeInstance()
public void setDateTimeInstance(DateFormat dateTimeInstance)
Copyright © 2015. All rights reserved.