- java.lang.Object
-
- org.joda.beans.ser.SerTypeMapper
-
public final class SerTypeMapper extends java.lang.ObjectType mapper for Joda-Bean serialization, used by serialization implementations.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.Class<?>decodeType(java.lang.String className, JodaBeanSer settings, java.lang.String basePackage, java.util.Map<java.lang.String,java.lang.Class<?>> knownTypes)Decodes a class, throwing an exception if not found.static java.lang.Class<?>decodeType(java.lang.String className, JodaBeanSer settings, java.lang.String basePackage, java.util.Map<java.lang.String,java.lang.Class<?>> knownTypes, java.lang.Class<?> defaultType)Decodes a class, returning a default if not found.static java.lang.StringencodeType(java.lang.Class<?> cls, JodaBeanSer settings, java.lang.String basePackage, java.util.Map<java.lang.Class<?>,java.lang.String> knownTypes)Encodes a basic class.java.lang.StringtoString()
-
-
-
Method Detail
-
encodeType
public static java.lang.String encodeType(java.lang.Class<?> cls, JodaBeanSer settings, java.lang.String basePackage, java.util.Map<java.lang.Class<?>,java.lang.String> knownTypes)Encodes a basic class.This handles known simple types, like String, Integer or File, and prefixing. It also allows a map of message specific shorter forms.
- Parameters:
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 shortening- Returns:
- the class object, null if not a basic type
-
decodeType
public static java.lang.Class<?> decodeType(java.lang.String className, JodaBeanSer settings, java.lang.String basePackage, java.util.Map<java.lang.String,java.lang.Class<?>> knownTypes) throws java.lang.ClassNotFoundExceptionDecodes a class, throwing an exception if not found.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.
- Parameters:
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 shortening- Returns:
- the class object, not null
- Throws:
java.lang.ClassNotFoundException- if not found
-
decodeType
public static java.lang.Class<?> decodeType(java.lang.String className, JodaBeanSer settings, java.lang.String basePackage, java.util.Map<java.lang.String,java.lang.Class<?>> knownTypes, java.lang.Class<?> defaultType) throws java.lang.ClassNotFoundExceptionDecodes a class, returning a default if not found.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.
- Parameters:
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 found- Returns:
- the class object, not null
- Throws:
java.lang.ClassNotFoundException- if an error occurs
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-