public final class RuntimeSerialization extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
register(Class<?>... classes)
Makes the provided classes available for serialization at runtime.
|
static void |
registerWithTargetConstructorClass(Class<?> clazz,
Class<?> customTargetConstructorClazz)
Makes the provided class available for serialization at runtime but uses the provided
customTargetConstructorClazz for deserialization.
|
public static void register(Class<?>... classes)
public static void registerWithTargetConstructorClass(Class<?> clazz, Class<?> customTargetConstructorClazz)
In some cases an application might explicitly make calls to
ReflectionFactory.newConstructorForSerialization(Class<?> cl, Constructor<?> constructorToCall)
where the passed `constructorToCall` differs from what would automatically be used if regular
deserialization of `cl` would happen. This method exists to also support such usecases.