public class MethodInterceptorFilter extends Object implements MethodInterceptor, Serializable
| Constructor and Description |
|---|
MethodInterceptorFilter(org.mockito.internal.InternalMockHandler handler,
org.mockito.mock.MockCreationSettings mockSettings) |
| Modifier and Type | Method and Description |
|---|---|
org.mockito.internal.invocation.MockitoMethod |
createMockitoMethod(Method method) |
org.mockito.internal.creation.util.MockitoMethodProxy |
createMockitoMethodProxy(MethodProxy methodProxy) |
org.mockito.invocation.MockHandler |
getHandler() |
Object |
intercept(Object proxy,
Method method,
Object[] args,
MethodProxy methodProxy)
All generated proxied methods call this method instead of the original method.
|
public MethodInterceptorFilter(org.mockito.internal.InternalMockHandler handler,
org.mockito.mock.MockCreationSettings mockSettings)
public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) throws Throwable
MethodInterceptorintercept in interface MethodInterceptorproxy - "this", the enhanced objectmethod - intercepted Methodargs - argument array; primitive types are wrappedmethodProxy - used to invoke super (non-intercepted method); may be called
as many times as neededThrowable - any exception may be thrown; if so, super method will not be invokedMethodProxypublic org.mockito.invocation.MockHandler getHandler()
public org.mockito.internal.creation.util.MockitoMethodProxy createMockitoMethodProxy(MethodProxy methodProxy)
public org.mockito.internal.invocation.MockitoMethod createMockitoMethod(Method method)
Copyright © 2007–2016. All rights reserved.