Class MockMethodInterceptor
- java.lang.Object
-
- org.mockito.internal.creation.bytebuddy.MockMethodInterceptor
-
- All Implemented Interfaces:
java.io.Serializable
public class MockMethodInterceptor extends java.lang.Object implements java.io.Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MockMethodInterceptor.DispatcherDefaultingToRealMethod
static class
MockMethodInterceptor.ForEquals
static class
MockMethodInterceptor.ForHashCode
static class
MockMethodInterceptor.ForWriteReplace
-
Field Summary
Fields Modifier and Type Field Description (package private) MockHandler
handler
private MockCreationSettings
mockCreationSettings
private ByteBuddyCrossClassLoaderSerializationSupport
serializationSupport
private static long
serialVersionUID
private java.lang.ThreadLocal<java.lang.Object>
weakReferenceHatch
-
Constructor Summary
Constructors Constructor Description MockMethodInterceptor(MockHandler handler, MockCreationSettings mockCreationSettings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) java.lang.Object
doIntercept(java.lang.Object mock, java.lang.reflect.Method invokedMethod, java.lang.Object[] arguments, RealMethod realMethod)
(package private) java.lang.Object
doIntercept(java.lang.Object mock, java.lang.reflect.Method invokedMethod, java.lang.Object[] arguments, RealMethod realMethod, Location location)
MockHandler
getMockHandler()
ByteBuddyCrossClassLoaderSerializationSupport
getSerializationSupport()
private void
readObject(java.io.ObjectInputStream stream)
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
handler
final MockHandler handler
-
mockCreationSettings
private final MockCreationSettings mockCreationSettings
-
serializationSupport
private final ByteBuddyCrossClassLoaderSerializationSupport serializationSupport
-
weakReferenceHatch
private transient java.lang.ThreadLocal<java.lang.Object> weakReferenceHatch
-
-
Constructor Detail
-
MockMethodInterceptor
public MockMethodInterceptor(MockHandler handler, MockCreationSettings mockCreationSettings)
-
-
Method Detail
-
readObject
private void readObject(java.io.ObjectInputStream stream) throws java.io.IOException, java.lang.ClassNotFoundException
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
doIntercept
java.lang.Object doIntercept(java.lang.Object mock, java.lang.reflect.Method invokedMethod, java.lang.Object[] arguments, RealMethod realMethod) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
doIntercept
java.lang.Object doIntercept(java.lang.Object mock, java.lang.reflect.Method invokedMethod, java.lang.Object[] arguments, RealMethod realMethod, Location location) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getMockHandler
public MockHandler getMockHandler()
-
getSerializationSupport
public ByteBuddyCrossClassLoaderSerializationSupport getSerializationSupport()
-
-