本文整理了Java中org.apache.ibatis.session.Configuration.isUseActualParamName()
方法的一些代码示例,展示了Configuration.isUseActualParamName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Configuration.isUseActualParamName()
方法的具体详情如下:
包路径:org.apache.ibatis.session.Configuration
类名称:Configuration
方法名:isUseActualParamName
暂无
代码示例来源:origin: camunda/camunda-bpm-platform
private List<String> getArgNames(Constructor<?> constructor) {
if (resultMap.configuration.isUseActualParamName() && Jdk.parameterExists) {
return ParamNameUtil.getParamNames(constructor);
} else {
List<String> paramNames = new ArrayList<String>();
final Annotation[][] paramAnnotations = constructor.getParameterAnnotations();
int paramCount = paramAnnotations.length;
for (int paramIndex = 0; paramIndex < paramCount; paramIndex++) {
String name = null;
for (Annotation annotation : paramAnnotations[paramIndex]) {
if (annotation instanceof Param) {
name = ((Param) annotation).value();
break;
}
}
paramNames.add(name != null ? name : "arg" + paramIndex);
}
return paramNames;
}
}
}
代码示例来源:origin: org.mybatis/mybatis
private List<String> getArgNames(Constructor<?> constructor) {
List<String> paramNames = new ArrayList<>();
List<String> actualParamNames = null;
final Annotation[][] paramAnnotations = constructor.getParameterAnnotations();
int paramCount = paramAnnotations.length;
for (int paramIndex = 0; paramIndex < paramCount; paramIndex++) {
String name = null;
for (Annotation annotation : paramAnnotations[paramIndex]) {
if (annotation instanceof Param) {
name = ((Param) annotation).value();
break;
}
}
if (name == null && resultMap.configuration.isUseActualParamName()) {
if (actualParamNames == null) {
actualParamNames = ParamNameUtil.getParamNames(constructor);
}
if (actualParamNames.size() > paramIndex) {
name = actualParamNames.get(paramIndex);
}
}
paramNames.add(name != null ? name : "arg" + paramIndex);
}
return paramNames;
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
if (config.isUseActualParamName()) {
name = getActualParamName(method, paramIndex);
代码示例来源:origin: org.mybatis/mybatis
if (config.isUseActualParamName()) {
name = getActualParamName(method, paramIndex);
内容来源于网络,如有侵权,请联系作者删除!