public abstract class GenericEntityClassFinder extends Object implements EntityClassFinder
EntityClassFinder.EntityClassFinderInstance, EntityClassFinder.MapperTypeMethodENTITY_CLASS_MAP| Constructor and Description |
|---|
GenericEntityClassFinder() |
| Modifier and Type | Method and Description |
|---|---|
Optional<Class<?>> |
findEntityClass(Class<?> mapperType,
Method mapperMethod)
查找当前方法对应的实体类
|
protected Optional<Class<?>> |
getEntityClassByMapperMethodAndMapperType(Class<?> mapperType,
Method mapperMethod)
根据方法所在接口泛型获取,只有定义在泛型接口中的方法才能通过泛型获取,定义的最终使用类中的无法通过泛型获取
|
protected Optional<Class<?>> |
getEntityClassByMapperMethodParamTypes(Class<?> mapperType,
Method mapperMethod)
根据方法参数获取
|
protected Optional<Class<?>> |
getEntityClassByMapperMethodReturnType(Class<?> mapperType,
Method mapperMethod)
根据方法返回值获取
|
protected Optional<Class<?>> |
getEntityClassByMapperType(Class<?> mapperType)
根据接口泛型获取,当前方法只根据接口泛型获取实体类,和当前执行的方法无关,是优先级最低的一种情况
|
protected Optional<Class<?>> |
getEntityClassByType(Type type)
根据 type 获取可能的实体类型
|
protected Optional<Class<?>> |
getEntityClassByTypes(Type[] types)
遍历 types 获取可能的实体类型
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfind, isEntityClasspublic Optional<Class<?>> findEntityClass(Class<?> mapperType, Method mapperMethod)
EntityClassFinderfindEntityClass in interface EntityClassFindermapperType - Mapper 接口,不能为空mapperMethod - Mapper 接口方法,可以为空protected Optional<Class<?>> getEntityClassByMapperMethodReturnType(Class<?> mapperType, Method mapperMethod)
mapperType - 接口mapperMethod - 方法protected Optional<Class<?>> getEntityClassByMapperMethodParamTypes(Class<?> mapperType, Method mapperMethod)
mapperType - 接口mapperMethod - 方法protected Optional<Class<?>> getEntityClassByMapperMethodAndMapperType(Class<?> mapperType, Method mapperMethod)
mapperType - 接口mapperMethod - 方法protected Optional<Class<?>> getEntityClassByMapperType(Class<?> mapperType)
mapperType - 接口protected Optional<Class<?>> getEntityClassByType(Type type)
type - 类型Copyright © 2023. All rights reserved.