1
0
mirror of synced 2026-05-22 18:53:15 +00:00

docs: generate even documentation (#310)

This commit is contained in:
Yury Semikhatsky
2021-03-01 17:36:52 -08:00
committed by GitHub
parent 7e3cec5aac
commit 5ce2bb6527
6 changed files with 255 additions and 0 deletions
@@ -570,10 +570,12 @@ class Event extends Element {
}
void writeListenerMethods(List<String> output, String offset) {
writeJavadoc(output, offset, comment());
String name = toTitle(jsonName);
String paramType = type.toJava();
String listenerType = "Consumer<" + paramType + ">";
output.add(offset + "void on" + name + "(" + listenerType + " handler);");
writeJavadoc(output, offset, "Removes handler that was previously added with {@link #on" + name + " on" + name + "(handler)}.");
output.add(offset + "void off" + name + "(" + listenerType + " handler);");
}
}