private void detectAnnotation(Method method, int index, Annotation annotation, Map<String, Integer> paramIndexes,
			Map<String, Integer> batchParamIndexMap, Class<?>[] paramTypes) throws DaoGenerateException {
		Class<? extends Annotation> annotationType = annotation.annotationType();
		if (Param.class.equals(annotationType)) {
			Param param = (Param) annotation;
			String value = param.value();

			if (RESULT_PARAM_VALUE.equals(value)) {
				throw new DaoGenerateException("方法[" + method + "]配置错误：不能使用@Param(\"" + RESULT_PARAM_VALUE
						+ "\")注解作为参数：\"" + RESULT_PARAM_VALUE + "\"为系统保留关键字");
			}

			addParam(value, index, paramIndexes);
		}
		if (BatchParam.class.equals(annotationType) && batchParamIndexMap != null) {
			BatchParam param = (BatchParam) annotation;
			String value = param.value();

			if (!ClassHelper.isTypeArray(paramTypes[index]) && !ClassHelper.isTypeList(paramTypes[index])) {
				throw new DaoGenerateException("方法[" + method + "]配置错误：@BatchParam只能配置在数组或者List实现类上");
			}

			addBatchParam(value, index, batchParamIndexMap);

		}
		if (GenericTable.class.equals(annotationType)) {
			GenericTable genericTable = (GenericTable) annotation;
			int order = genericTable.index();

			addGenericTable(index, order);
		}
	}