public class JbootJavassistProxyFactory extends com.jfinal.proxy.ProxyFactory
配置方法:
public void configConstant(Constants me) {
ProxyManager.me().setProxyFactory(new JbootJavassistProxyFactory());
}
| 限定符和类型 | 字段和说明 |
|---|---|
private static Function<Class<?>,javassist.util.proxy.MethodHandler> |
methodInterceptor
方便在单元测试的时候,可以对任意 class 进行 Mock
|
| 构造器和说明 |
|---|
JbootJavassistProxyFactory() |
| 限定符和类型 | 方法和说明 |
|---|---|
<T> T |
get(Class<T> target) |
static Function<Class<?>,javassist.util.proxy.MethodHandler> |
getMethodInterceptor() |
static void |
setMethodInterceptor(Function<Class<?>,javassist.util.proxy.MethodHandler> methodInterceptor) |
private static Function<Class<?>,javassist.util.proxy.MethodHandler> methodInterceptor
public JbootJavassistProxyFactory()
public static Function<Class<?>,javassist.util.proxy.MethodHandler> getMethodInterceptor()
public static void setMethodInterceptor(Function<Class<?>,javassist.util.proxy.MethodHandler> methodInterceptor)
Copyright © 2024. All rights reserved.