Class NativeTypeIdProvider
java.lang.Object
com.pnfsoftware.jeb.util.serialization.AbstractTypeIdProvider
com.pnfsoftware.jeb.util.serialization.NativeTypeIdProvider
- All Implemented Interfaces:
ITypeIdProvider
A standard provider for native Java types. Currently, this provider supports:
- Pseudo-support for
Object
since all objects inherit it - Primitive types: boolean, byte, char, short, int, long, float, double
- Objects wrapping the primitive types:
Boolean
,Byte
,Character
,Short
,Integer
,Long
,Float
,Double
- Char-sequence types:
String
- Big-num types:
BigInteger
andBigDecimal
- List types:
ArrayList
,LinkedList
,ArrayDeque
- Set types:
HashSet
,TreeSet
,LinkedHashSet
- Map types:
HashMap
,TreeMap
,LinkedHashMap
,IdentityHashMap
Ser
type) will result in
undefined behavior.
Caveats regarding collections and maps: when serializing those objects, optional parameters such
as the initial capacity, the load factor, or even a custom comparator (for tree-sets/maps) are
not persisted. Therefore, they cannot be automatically restored. It is up to the implementation
to wrap such objects in higher-level classes using a custom constructor
that can call the original object (collection or map) constructor's with proper parameters. This
is especially critical for TreeMap or TreeSet using custom comparators.
-
Method Summary
Methods inherited from class com.pnfsoftware.jeb.util.serialization.AbstractTypeIdProvider
addAll, getId, getMap, getReverseMap, getType
-
Method Details
-
getInstance
-
loadTypes
- Specified by:
loadTypes
in classAbstractTypeIdProvider
-