Preserve parameter level annotations in generated source
This commit is contained in:
parent
881de93799
commit
12ba416181
|
@ -235,6 +235,7 @@ public class JdbcMapperProcessor extends AbstractProcessor {
|
||||||
final int numParams = params.size();
|
final int numParams = params.size();
|
||||||
int count = 0;
|
int count = 0;
|
||||||
for (final VariableElement param : params) {
|
for (final VariableElement param : params) {
|
||||||
|
writeAllParamAnnotations(w, param);
|
||||||
w.write("final ");
|
w.write("final ");
|
||||||
w.write(param.asType().toString());
|
w.write(param.asType().toString());
|
||||||
w.write(' ');
|
w.write(' ');
|
||||||
|
@ -593,6 +594,12 @@ public class JdbcMapperProcessor extends AbstractProcessor {
|
||||||
w.write(");\n");
|
w.write(");\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void writeAllParamAnnotations(final Writer w, final VariableElement param) throws IOException {
|
||||||
|
// todo: should this always be done for everything? allow turn off, exclude some annotations, or what?
|
||||||
|
for(final AnnotationMirror am : param.getAnnotationMirrors())
|
||||||
|
w.append(am.toString()).append(' ');
|
||||||
|
}
|
||||||
|
|
||||||
private static TypeMirror getSqlParser(final JdbcMapper.Mapper mapper) {
|
private static TypeMirror getSqlParser(final JdbcMapper.Mapper mapper) {
|
||||||
// ridiculous isn't it?
|
// ridiculous isn't it?
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue