| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static void | |
| public static void | registerIncludingAssociatedClasses(Class<?>
the serialization target class clazz)Register the specified serialization target class itself and all associated classes. |
| public static void | registerLambdaCapturingClass(Class<?> lambdaCapturingClass)
Makes a class available for serialization at runtime that is created for the lambda expressions (a class that has a $deserializeLambda$ method) specified by the lambdaCapturingClass. |
| public static void | registerProxyClass(Class<?>... implementedInterfaces)
Makes a dynamic proxy class (class that extends |
| public static void | registerWithTargetConstructorClass(Class<?> clazz, Class<?> customTargetConstructorClazz)
Makes the provided class available for serialization at runtime but uses the provided customTargetConstructorClazz for deserialization. |
| RuntimeSerialization | back to summary |
|---|---|
| private RuntimeSerialization() | |
| register | back to summary |
|---|---|
| public static void register(Class<?>... classes) Makes the provided classes available for serialization at runtime.
| |
| registerIncludingAssociatedClasses | back to summary |
|---|---|
| public static void registerIncludingAssociatedClasses(Class<?> clazz) Register the specified serialization target class itself and all associated classes. According to the Java Object Serialization Specification, the associated classes include 1) all the target class' non-static and non-transient fields types and their associated classes; 2) other fields defined in the customised writeObject(ObjectOutputStream) and readObject(ObjectInputStream). This method can automatically explore all possible serialization target classes in the first scenario, but can't figure out the classes in the second scenario.
Another limitation is the specified
| |
| registerLambdaCapturingClass | back to summary |
|---|---|
| public static void registerLambdaCapturingClass(Class<?> lambdaCapturingClass) Makes a class available for serialization at runtime that is created for the lambda expressions (a class that has a $deserializeLambda$ method) specified by the lambdaCapturingClass.
| |
| registerProxyClass | back to summary |
|---|---|
| public static void registerProxyClass(Class<?>... implementedInterfaces) Makes a dynamic proxy class (class that extends
| |
| registerWithTargetConstructorClass | back to summary |
|---|---|
| public static void registerWithTargetConstructorClass(Class<?> clazz, Class<?> customTargetConstructorClazz) Makes the provided class available for serialization at runtime but uses the provided customTargetConstructorClazz for deserialization.
In some cases an application might explicitly make calls to
| |