Package org.apache.ibatis.binding
Class MapperProxy<T>
- java.lang.Object
-
- org.apache.ibatis.binding.MapperProxy<T>
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.reflect.InvocationHandler
public class MapperProxy<T> extends java.lang.Object implements java.lang.reflect.InvocationHandler, java.io.Serializable- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classMapperProxy.DefaultMethodInvoker(package private) static interfaceMapperProxy.MapperMethodInvokerprivate static classMapperProxy.PlainMethodInvoker
-
Field Summary
Fields Modifier and Type Field Description private static intALLOWED_MODESprivate static java.lang.reflect.Constructor<java.lang.invoke.MethodHandles.Lookup>lookupConstructorprivate java.lang.Class<T>mapperInterfaceprivate java.util.Map<java.lang.reflect.Method,MapperProxy.MapperMethodInvoker>methodCacheprivate static java.lang.reflect.MethodprivateLookupInMethodprivate static longserialVersionUIDprivate SqlSessionsqlSession
-
Constructor Summary
Constructors Constructor Description MapperProxy(SqlSession sqlSession, java.lang.Class<T> mapperInterface, java.util.Map<java.lang.reflect.Method,MapperProxy.MapperMethodInvoker> methodCache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private MapperProxy.MapperMethodInvokercachedInvoker(java.lang.reflect.Method method)private java.lang.invoke.MethodHandlegetMethodHandleJava8(java.lang.reflect.Method method)private java.lang.invoke.MethodHandlegetMethodHandleJava9(java.lang.reflect.Method method)java.lang.Objectinvoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
ALLOWED_MODES
private static final int ALLOWED_MODES
- See Also:
- Constant Field Values
-
lookupConstructor
private static final java.lang.reflect.Constructor<java.lang.invoke.MethodHandles.Lookup> lookupConstructor
-
privateLookupInMethod
private static final java.lang.reflect.Method privateLookupInMethod
-
sqlSession
private final SqlSession sqlSession
-
mapperInterface
private final java.lang.Class<T> mapperInterface
-
methodCache
private final java.util.Map<java.lang.reflect.Method,MapperProxy.MapperMethodInvoker> methodCache
-
-
Constructor Detail
-
MapperProxy
public MapperProxy(SqlSession sqlSession, java.lang.Class<T> mapperInterface, java.util.Map<java.lang.reflect.Method,MapperProxy.MapperMethodInvoker> methodCache)
-
-
Method Detail
-
invoke
public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.Throwable- Specified by:
invokein interfacejava.lang.reflect.InvocationHandler- Throws:
java.lang.Throwable
-
cachedInvoker
private MapperProxy.MapperMethodInvoker cachedInvoker(java.lang.reflect.Method method) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getMethodHandleJava9
private java.lang.invoke.MethodHandle getMethodHandleJava9(java.lang.reflect.Method method) throws java.lang.NoSuchMethodException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException- Throws:
java.lang.NoSuchMethodExceptionjava.lang.IllegalAccessExceptionjava.lang.reflect.InvocationTargetException
-
getMethodHandleJava8
private java.lang.invoke.MethodHandle getMethodHandleJava8(java.lang.reflect.Method method) throws java.lang.IllegalAccessException, java.lang.InstantiationException, java.lang.reflect.InvocationTargetException- Throws:
java.lang.IllegalAccessExceptionjava.lang.InstantiationExceptionjava.lang.reflect.InvocationTargetException
-
-