| java.lang.Object | |
| ↳ | com.pnfsoftware.jeb.util.serialization.AbstractTypeIdProvider |
Known Direct Subclasses
|
Base class for a type-id provider. Type-id providers can be used to de-couple the a saved object from its type name. The type-id can be saved instead, allowing type names to change without breaking the deserialization process.
| Protected Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| AbstractTypeIdProvider() | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| void |
addAll(ITypeIdProvider provider)
Add of types from a provider to this provider.
| ||||||||||
| int |
getId(Class<?> c)
Get the ype-id of a given type.
| ||||||||||
| Map<Class<?>, Integer> |
getMap()
Get the map of type to type-id.
| ||||||||||
| Map<Integer, Class<?>> |
getReverseMap()
Get the reverse type-id map, mapping a type-id to a type.
| ||||||||||
| Class<?> |
getType(int typeId)
Get a type by type-id.
| ||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| abstract void | loadTypes(Map<Class<?>, Integer> map) | ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.pnfsoftware.jeb.util.serialization.ITypeIdProvider
| |||||||||||
Add of types from a provider to this provider.
| provider | another provider |
|---|
Get the ype-id of a given type.
| c | the non-null type |
|---|
Get the map of type to type-id.
Get the reverse type-id map, mapping a type-id to a type.
Get a type by type-id.
| typeId | the non-zero type-id |
|---|