aesthetic fix to the processor-generated jdoc

This commit is contained in:
Gavin King 2024-03-22 19:53:56 +01:00
parent 8b021ac01f
commit c7504d4ada
1 changed files with 27 additions and 23 deletions

View File

@ -92,34 +92,38 @@ public abstract class AbstractFinderMethod extends AbstractQueryMethod {
.append("\n * Find ")
.append("{@link ")
.append(annotationMetaEntity.importType(entity))
.append("} by ");
.append("}");
long paramCount = paramTypes.stream()
.filter(type -> !isSpecialParam(type))
.count();
int count = 0;
for (int i = 0; i < paramTypes.size(); i++) {
String type = paramTypes.get(i);
if ( !isSpecialParam(type) ) {
if ( count>0 ) {
if ( count + 1 == paramCount) {
declaration
.append(paramCount>2 ? ", and " : " and "); //Oxford comma
}
else {
declaration
.append(", ");
if ( paramCount> 0 ) {
declaration
.append(" by ");
int count = 0;
for (int i = 0; i < paramTypes.size(); i++) {
final String type = paramTypes.get(i);
if ( !isSpecialParam(type) ) {
if ( count>0 ) {
if ( count + 1 == paramCount) {
declaration
.append(paramCount>2 ? ", and " : " and "); //Oxford comma
}
else {
declaration
.append(", ");
}
}
count++;
final String path = paramNames.get(i);
declaration
.append("{@link ")
.append(annotationMetaEntity.importType(entity))
.append('#')
.append(qualifier(path))
.append(' ')
.append(path)
.append("}");
}
count++;
final String path = paramNames.get(i);
declaration
.append("{@link ")
.append(annotationMetaEntity.importType(entity))
.append('#')
.append(qualifier(path))
.append(' ')
.append(path)
.append("}");
}
}
declaration