public final class SerTypeMapper extends Object
| Modifier and Type | Method and Description |
|---|---|
static Class<?> |
decodeType(String className,
JodaBeanSer settings,
String basePackage,
Map<String,Class<?>> knownTypes)
Decodes a class, throwing an exception if not found.
|
static Class<?> |
decodeType(String className,
JodaBeanSer settings,
String basePackage,
Map<String,Class<?>> knownTypes,
Class<?> defaultType)
Decodes a class, returning a default if not found.
|
static String |
encodeType(Class<?> cls,
JodaBeanSer settings,
String basePackage,
Map<Class<?>,String> knownTypes)
Encodes a basic class.
|
String |
toString() |
public static String encodeType(Class<?> cls, JodaBeanSer settings, String basePackage, Map<Class<?>,String> knownTypes)
This handles known simple types, like String, Integer or File, and prefixing. It also allows a map of message specific shorter forms.
cls - the class to encode, not nullsettings - the settings object, not nullbasePackage - the base package to use with trailing dot, null if noneknownTypes - the known types map, null if not using known type shorteningpublic static Class<?> decodeType(String className, JodaBeanSer settings, String basePackage, Map<String,Class<?>> knownTypes) throws ClassNotFoundException
This uses the context class loader. This handles known simple types, like String, Integer or File, and prefixing. It also allows a map of message specific shorter forms.
className - the class name, not nullsettings - the settings object, not nullbasePackage - the base package to use with trailing dot, null if noneknownTypes - the known types map, null if not using known type shorteningClassNotFoundException - if not foundpublic static Class<?> decodeType(String className, JodaBeanSer settings, String basePackage, Map<String,Class<?>> knownTypes, Class<?> defaultType) throws ClassNotFoundException
This uses the context class loader. This handles known simple types, like String, Integer or File, and prefixing. It also allows a map of message specific shorter forms.
className - the class name, not nullsettings - the settings object, not nullbasePackage - the base package to use with trailing dot, null if noneknownTypes - the known types map, null if not using known type shorteningdefaultType - the type to use as a default if the type cannot be foundClassNotFoundException - if an error occursCopyright © 2007–2017 Joda.org. All rights reserved.