public final class RuntimeSerialization extends Object
|Modifier and Type||Method and Description|
Makes the provided classes available for serialization at runtime.
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.