Add support for class file parameter names

This commit is contained in:
Chloe
2022-01-11 19:08:47 +00:00
committed by GitHub
parent 3407e84d53
commit f30760cbd6

View File

@@ -213,7 +213,7 @@ public final class Callbacks {
final boolean hasName = annotation != null && Strings.isNotBlank(annotation.value());
final boolean hasDescription = annotation != null && Strings.isNotBlank(annotation.description());
this.name = hasName ? annotation.value() : null;
this.name = hasName ? annotation.value() : (parameter.isNamePresent() ? parameter.getName() : null);
if (parameterDescriptions.containsKey(this.name)) {
this.description = parameterDescriptions.get(this.name);