chore: delete code for generating custom option names (#249)

This commit is contained in:
Yury Semikhatsky 2021-02-02 18:05:34 -08:00 committed by GitHub
parent d14d35610e
commit a577e62ece
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 18 deletions

View File

@ -114,7 +114,7 @@ public interface Keyboard {
*
* @param key Name of the key to press or a character to generate, such as {@code ArrowLeft} or {@code a}.
*/
void press(String key, PressOptions delay);
void press(String key, PressOptions options);
default void type(String text) {
type(text, null);
}
@ -127,7 +127,7 @@ public interface Keyboard {
*
* @param text A text to type into a focused element.
*/
void type(String text, TypeOptions delay);
void type(String text, TypeOptions options);
/**
* Dispatches a {@code keyup} event.
*

View File

@ -760,7 +760,7 @@ class Method extends Element {
sections.add("");
hasBlankLine = true;
}
sections.add("@param " + p.name() + " " + comment);
sections.add("@param " + p.jsonName + " " + comment);
}
}
if (jsonElement.getAsJsonObject().has("returnComment")) {
@ -778,12 +778,6 @@ class Method extends Element {
class Param extends Element {
final TypeRef type;
private static Map<String, String> customName = new HashMap<>();
static {
customName.put("Keyboard.type.options", "delay");
customName.put("Keyboard.press.options", "delay");
}
Param(Method method, JsonObject jsonElement) {
super(method, jsonElement);
type = new TypeRef(this, jsonElement.get("type").getAsJsonObject());
@ -793,16 +787,8 @@ class Param extends Element {
return !jsonElement.getAsJsonObject().get("required").getAsBoolean();
}
String name() {
String name = customName.get(jsonPath);
if (name != null) {
return name;
}
return jsonName;
}
String toJava() {
return type.toJava() + " " + name();
return type.toJava() + " " + jsonName;
}
}