ClassProxyFactory
, JavaProxyFactory
public interface IProxyFactory
Modifier and Type | Method | Description |
---|---|---|
<T> T |
createProxy(java.lang.Class<T> toMock,
java.lang.reflect.InvocationHandler handler,
java.lang.reflect.Method[] mockedMethods,
ConstructorArgs constructorArgs) |
|
java.lang.reflect.InvocationHandler |
getInvocationHandler(java.lang.Object mock) |
Returns the invocation handler for
mock ; |
<T> T createProxy(java.lang.Class<T> toMock, java.lang.reflect.InvocationHandler handler, java.lang.reflect.Method[] mockedMethods, ConstructorArgs constructorArgs)
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.constructorArgs
- the constructor arguments to use, or null to use
heuristics to choose a constructor.java.lang.reflect.InvocationHandler getInvocationHandler(java.lang.Object mock)
mock
;mock
- a mock instance previously returned by createProxy
.mock
Copyright © 2001-2019 EasyMock contributors. This documentation is provided under the terms of the Apache 2 licence.