Class ByteBuddyCrossClassLoaderSerializationSupport.CrossClassLoaderSerializationProxy

java.lang.Object
org.mockito.internal.creation.bytebuddy.ByteBuddyCrossClassLoaderSerializationSupport.CrossClassLoaderSerializationProxy
All Implemented Interfaces:
Serializable
Enclosing class:
ByteBuddyCrossClassLoaderSerializationSupport

public static class ByteBuddyCrossClassLoaderSerializationSupport.CrossClassLoaderSerializationProxy extends Object implements Serializable
This is the serialization proxy that will encapsulate the real mock data as a byte array.

When called in the constructor it will serialize the mock in a byte array using a custom ByteBuddyCrossClassLoaderSerializationSupport.MockitoMockObjectOutputStream that will annotate the mock class in the stream. Other information are used in this class in order to facilitate deserialization.

Deserialization of the mock will be performed by the readResolve() method via the custom ByteBuddyCrossClassLoaderSerializationSupport.MockitoMockObjectInputStream that will be in charge of creating the mock class.

See Also: