public class MybatisMapperProxy<T> extends Object implements InvocationHandler, Serializable
参考 MapperProxy
| 限定符和类型 | 类和说明 |
|---|---|
private static class |
MybatisMapperProxy.DefaultMethodInvoker |
static interface |
MybatisMapperProxy.MapperMethodInvoker |
private static class |
MybatisMapperProxy.PlainMethodInvoker |
| 限定符和类型 | 字段和说明 |
|---|---|
private static int |
ALLOWED_MODES |
private static Constructor<MethodHandles.Lookup> |
lookupConstructor |
private Class<T> |
mapperInterface |
private Map<Method,MybatisMapperProxy.MapperMethodInvoker> |
methodCache |
private static Method |
privateLookupInMethod |
private static long |
serialVersionUID |
protected org.apache.ibatis.session.SqlSession |
sqlSession |
| 构造器和说明 |
|---|
MybatisMapperProxy(org.apache.ibatis.session.SqlSession sqlSession,
Class<T> mapperInterface,
Map<Method,MybatisMapperProxy.MapperMethodInvoker> methodCache) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected MybatisMapperProxy.MapperMethodInvoker |
cachedInvoker(Method method) |
private MethodHandle |
getMethodHandleJava8(Method method) |
private MethodHandle |
getMethodHandleJava9(Method method) |
Object |
invoke(Object proxy,
Method method,
Object[] args) |
private static final long serialVersionUID
private static final int ALLOWED_MODES
private static final Constructor<MethodHandles.Lookup> lookupConstructor
private static final Method privateLookupInMethod
protected final org.apache.ibatis.session.SqlSession sqlSession
private final Class<T> mapperInterface
private final Map<Method,MybatisMapperProxy.MapperMethodInvoker> methodCache
public MybatisMapperProxy(org.apache.ibatis.session.SqlSession sqlSession, Class<T> mapperInterface, Map<Method,MybatisMapperProxy.MapperMethodInvoker> methodCache)
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke 在接口中 InvocationHandlerThrowableprotected MybatisMapperProxy.MapperMethodInvoker cachedInvoker(Method method) throws Throwable
Throwableprivate MethodHandle getMethodHandleJava9(Method method) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException
private MethodHandle getMethodHandleJava8(Method method) throws IllegalAccessException, InstantiationException, InvocationTargetException
Copyright © 2024. All rights reserved.