-
Sub-task
-
Resolution: Delivered
-
P4
-
24
New methods have been added to `sun.reflect.ReflectionFactory` to allow custom serialization libraries get `MethodHandle`s to invoke methods that implement the default behavior for serializable classes. The new methods are `defaultReadObjectForSerialization` and `defaultWriteObjectForSerialization`. The method `serialPersistentFields` has also been added to allow custom serialization libraries obtain the `serialPersistentFields` from a serializable class.
`sun.reflect.ReflectionFactory` is an undocumented API in the `jdk.unsupported` module. It serves as a stop-gap for custom serialization that would otherwise need to break encapsulation to access inaccessible fields.
`sun.reflect.ReflectionFactory` is an undocumented API in the `jdk.unsupported` module. It serves as a stop-gap for custom serialization that would otherwise need to break encapsulation to access inaccessible fields.