Uses of Interface
org.mockito.invocation.MockHandler
Packages that use MockHandler
Package
Description
Mockito is a mock library for java - see
Mockito class for usage.ByteBuddy related stuff.
Mock makers based on the
Proxy utility.Static utils
Mockito plugins allow customization of behavior.
-
Uses of MockHandler in org.mockito
Methods in org.mockito that return MockHandlerModifier and TypeMethodDescriptionMockingDetails.getMockHandler()Returns theMockHandlerassociated with this mock object. -
Uses of MockHandler in org.mockito.internal.creation.bytebuddy
Fields in org.mockito.internal.creation.bytebuddy declared as MockHandlerModifier and TypeFieldDescriptionprivate final MockHandlerInlineDelegateByteBuddyMockMaker.InlineStaticMockControl.handler(package private) final MockHandlerMockMethodInterceptor.handlerFields in org.mockito.internal.creation.bytebuddy with type parameters of type MockHandlerModifier and TypeFieldDescriptionprivate final Function<MockedConstruction.Context, MockHandler<T>> InlineDelegateByteBuddyMockMaker.InlineConstructionMockControl.handlerFactoryMethods in org.mockito.internal.creation.bytebuddy that return MockHandlerModifier and TypeMethodDescriptionByteBuddyMockMaker.getHandler(Object mock) InlineByteBuddyMockMaker.getHandler(Object mock) InlineDelegateByteBuddyMockMaker.getHandler(Object mock) SubclassByteBuddyMockMaker.getHandler(Object mock) MockMethodInterceptor.getMockHandler()Methods in org.mockito.internal.creation.bytebuddy with parameters of type MockHandlerModifier and TypeMethodDescription<T> TByteBuddyMockMaker.createMock(MockCreationSettings<T> settings, MockHandler handler) <T> TInlineByteBuddyMockMaker.createMock(MockCreationSettings<T> settings, MockHandler handler) <T> TInlineDelegateByteBuddyMockMaker.createMock(MockCreationSettings<T> settings, MockHandler handler) <T> TSubclassByteBuddyMockMaker.createMock(MockCreationSettings<T> settings, MockHandler handler) <T> Optional<T> ByteBuddyMockMaker.createSpy(MockCreationSettings<T> settings, MockHandler handler, T object) <T> Optional<T> InlineByteBuddyMockMaker.createSpy(MockCreationSettings<T> settings, MockHandler handler, T instance) <T> Optional<T> InlineDelegateByteBuddyMockMaker.createSpy(MockCreationSettings<T> settings, MockHandler handler, T object) <T> MockMaker.StaticMockControl<T> ByteBuddyMockMaker.createStaticMock(Class<T> type, MockCreationSettings<T> settings, MockHandler handler) <T> MockMaker.StaticMockControl<T> InlineByteBuddyMockMaker.createStaticMock(Class<T> type, MockCreationSettings<T> settings, MockHandler handler) <T> MockMaker.StaticMockControl<T> InlineDelegateByteBuddyMockMaker.createStaticMock(Class<T> type, MockCreationSettings<T> settings, MockHandler handler) private <T> TInlineDelegateByteBuddyMockMaker.doCreateMock(MockCreationSettings<T> settings, MockHandler handler, boolean nullOnNonInlineConstruction) voidByteBuddyMockMaker.resetMock(Object mock, MockHandler newHandler, MockCreationSettings settings) voidInlineByteBuddyMockMaker.resetMock(Object mock, MockHandler newHandler, MockCreationSettings settings) voidInlineDelegateByteBuddyMockMaker.resetMock(Object mock, MockHandler newHandler, MockCreationSettings settings) voidSubclassByteBuddyMockMaker.resetMock(Object mock, MockHandler newHandler, MockCreationSettings settings) Constructors in org.mockito.internal.creation.bytebuddy with parameters of type MockHandlerModifierConstructorDescriptionprivateInlineStaticMockControl(Class<T> type, Map<Class<?>, MockMethodInterceptor> interceptors, MockCreationSettings<T> settings, MockHandler handler) MockMethodInterceptor(MockHandler handler, MockCreationSettings mockCreationSettings) -
Uses of MockHandler in org.mockito.internal.creation.proxy
Fields in org.mockito.internal.creation.proxy with type parameters of type MockHandlerModifier and TypeFieldDescriptionprivate final AtomicReference<MockHandler<?>> ProxyMockMaker.MockInvocationHandler.handlerMethods in org.mockito.internal.creation.proxy that return MockHandlerMethods in org.mockito.internal.creation.proxy with parameters of type MockHandlerModifier and TypeMethodDescription<T> TProxyMockMaker.createMock(MockCreationSettings<T> settings, MockHandler handler) voidProxyMockMaker.resetMock(Object mock, MockHandler newHandler, MockCreationSettings settings) Constructors in org.mockito.internal.creation.proxy with parameters of type MockHandlerModifierConstructorDescriptionprivateMockInvocationHandler(MockHandler<?> handler, MockCreationSettings<?> settings) -
Uses of MockHandler in org.mockito.internal.handler
Classes in org.mockito.internal.handler that implement MockHandlerModifier and TypeClassDescription(package private) classHandler, that call all listeners wanted for this mock, before delegating it to the parameterized handler.classInvocation handler set on mock objects.(package private) classProtects the results from delegate MockHandler.Fields in org.mockito.internal.handler declared as MockHandlerModifier and TypeFieldDescriptionprivate final MockHandler<T> NullResultGuardian.delegateprivate final MockHandler<T> InvocationNotifierHandler.mockHandlerMethods in org.mockito.internal.handler that return MockHandlerModifier and TypeMethodDescriptionstatic <T> MockHandler<T> MockHandlerFactory.createMockHandler(MockCreationSettings<T> settings) Constructors in org.mockito.internal.handler with parameters of type MockHandlerModifierConstructorDescriptionInvocationNotifierHandler(MockHandler<T> mockHandler, MockCreationSettings<T> settings) NullResultGuardian(MockHandler<T> delegate) -
Uses of MockHandler in org.mockito.internal.util
Methods in org.mockito.internal.util that return MockHandlerModifier and TypeMethodDescriptionDefaultMockingDetails.getMockHandler()static MockHandler<?> MockUtil.getMockHandler(Object mock) private static MockHandler<?> MockUtil.getMockHandlerOrNull(Object mock) private MockHandler<?> DefaultMockingDetails.mockHandler() -
Uses of MockHandler in org.mockito.plugins
Methods in org.mockito.plugins that return MockHandlerModifier and TypeMethodDescriptionMockMaker.getHandler(Object mock) Returns the handler for themock.Methods in org.mockito.plugins with parameters of type MockHandlerModifier and TypeMethodDescription<T> TMockMaker.createMock(MockCreationSettings<T> settings, MockHandler handler) If you want to provide your own implementation ofMockMakerthis method should: Create a proxy object that implementssettings.typeToMockand potentially alsosettings.extraInterfaces. You may use the information fromsettingsto create/configure your proxy object. Your proxy object should carry thehandlerwith it.default <T> Optional<T> MockMaker.createSpy(MockCreationSettings<T> settings, MockHandler handler, T instance) By implementing this method, a mock maker can optionally support the creation of spies where all fields are set within a constructor.default <T> MockMaker.StaticMockControl<T> MockMaker.createStaticMock(Class<T> type, MockCreationSettings<T> settings, MockHandler handler) If you want to provide your own implementation ofMockMakerthis method should: Alter the supplied class to only change its behavior in the current thread. Only alters the static method's behavior after being enabled. Stops the altered behavior when disabled.voidMockMaker.resetMock(Object mock, MockHandler newHandler, MockCreationSettings settings) Replaces the existing handler onmockwithnewHandler.