public class MockProxyHandlerFactoryImpl extends Object implements MockProxyHandlerFactory
| Modifier and Type | Class and Description |
|---|---|
static class |
MockProxyHandlerFactoryImpl.DefaultMockProxyHandler
默认的mock接口代理处理器实现
|
| Constructor and Description |
|---|
MockProxyHandlerFactoryImpl() |
| Modifier and Type | Method and Description |
|---|---|
InvocationHandler |
getHandler(BiFunction<Class<?>,String,MockObject<?>> mockObjectFunction)
获取接口代理处理器实例
首先,只扫描所有的抽象方法,default方法不会代理,而是执行它自己。
|
public InvocationHandler getHandler(BiFunction<Class<?>,String,MockObject<?>> mockObjectFunction)
getHandler in interface MockProxyHandlerFactorymockObjectFunction - 传入一个类型,获取一个mockObject对象。如果是Map类型,则第二参数为map的名称,否则忽视第二参数。InvocationHandlerCopyright © 2024. All rights reserved.