| | |
| | | return resultMap; |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | Class<?> a = DataTableEntity.class; |
| | | Class<DataTableEntity> b = DataTableEntity.class; |
| | | System.out.println(a.equals(b)); |
| | | } |
| | | |
| | | /** |
| | | * 事件前或者事件后调用逻辑方法的特殊处理 |
| | | * |
| | |
| | | //使用huTool的反射工具类获取方法,方法的参数类型为DataTableEntity、List<List<String>> |
| | | Method method = ReflectUtil.getMethod(bean.getClass(), methodName, DataTableEntity.class, List.class); |
| | | if (method != null) { |
| | | //判断method返回值为DataTableEntity |
| | | boolean isBackDataTable = !method.getReturnType().equals(DataTableEntity.class); |
| | | Type genericReturnType = method.getGenericReturnType(); |
| | | //判断method返回值为DataTableEntity.class |
| | | boolean isBackDataTable = genericReturnType.getTypeName().equals("com.product.core.entity.DataTableEntity"); |
| | | //判断第二个参数的泛型类型 |
| | | Type[] types = method.getGenericParameterTypes(); |
| | | Type type = types[1]; |