public class ClassProxyFactory extends Object implements IProxyFactory
Modifier and Type | Class and Description |
---|---|
static class |
ClassProxyFactory.MockMethodInterceptor |
Constructor and Description |
---|
ClassProxyFactory() |
Modifier and Type | Method and Description |
---|---|
<T> T |
createProxy(Class<T> toMock,
InvocationHandler handler,
Method[] mockedMethods,
ConstructorArgs args) |
InvocationHandler |
getInvocationHandler(Object mock)
Returns the invocation handler for
mock ; |
static boolean |
isCallerMockInvocationHandlerInvoke(Throwable e) |
public static boolean isCallerMockInvocationHandlerInvoke(Throwable e)
@IgnoreAnimalSniffer public <T> T createProxy(Class<T> toMock, InvocationHandler handler, Method[] mockedMethods, ConstructorArgs args)
createProxy
in interface IProxyFactory
T
- type of the class to mocktoMock
- the class to mock by the factoryhandler
- the handler that will be linked to the created proxymockedMethods
- the subset of toMock
's methods to mock, or
null to mock all methods.args
- the constructor arguments to use, or null to use
heuristics to choose a constructor.public InvocationHandler getInvocationHandler(Object mock)
IProxyFactory
mock
;getInvocationHandler
in interface IProxyFactory
mock
- a mock instance previously returned by createProxy
.mock
Copyright © 2001–2022 EasyMock contributors. All rights reserved.