mirror of
https://github.com/moparisthebest/JdbcMapper
synced 2024-12-22 07:18:51 -05:00
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();
|
||||
int count = 0;
|
||||
for (final VariableElement param : params) {
|
||||
writeAllParamAnnotations(w, param);
|
||||
w.write("final ");
|
||||
w.write(param.asType().toString());
|
||||
w.write(' ');
|
||||
@ -593,6 +594,12 @@ public class JdbcMapperProcessor extends AbstractProcessor {
|
||||
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) {
|
||||
// ridiculous isn't it?
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user