public class MapperJavaProxy extends Object implements InvocationHandler
Modifier and Type | Field and Description |
---|---|
protected DefaultMapperBuilder |
builder |
protected DBClient |
client
The db client.
|
protected Class<?> |
entityClass
The entity class.
|
Constructor and Description |
---|
MapperJavaProxy()
The Constructor.
|
MapperJavaProxy(DefaultMapperBuilder builder,
DBClient client,
Class<?> mapperInterface) |
Modifier and Type | Method and Description |
---|---|
MapperJavaProxy |
build()
Builds the.
|
protected void |
checkArgs()
Check args.
|
MapperJavaProxy |
entityClass(Class<?> entityClass)
Entity class.
|
Object |
invoke(Object proxy,
Method method,
Object[] args)
Invoke.
|
MapperJavaProxy |
mapperInterface(Class<?> mapperInterface)
Mapper interface.
|
protected void |
onResolveEntityClassFromMapperInterface(Class<?> mapperInterface)
获取BaseMapper<EntityClass>接口的泛型实体参数类.
|
String |
toString() |
protected DBClient client
protected Class<?> entityClass
protected DefaultMapperBuilder builder
public MapperJavaProxy()
public MapperJavaProxy(DefaultMapperBuilder builder, DBClient client, Class<?> mapperInterface)
builder
- client
- mapperInterface
- public MapperJavaProxy mapperInterface(Class<?> mapperInterface)
mapperInterface
- the dao2 interfacepublic MapperJavaProxy entityClass(Class<?> entityClass)
entityClass
- the entity classprotected void checkArgs()
public MapperJavaProxy build()
protected void onResolveEntityClassFromMapperInterface(Class<?> mapperInterface)
mapperInterface
- the dao2 interfacepublic Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke
in interface InvocationHandler
proxy
- the proxymethod
- the methodargs
- the argsThrowable
- the throwableCopyright © 2020. All rights reserved.