mirror of
https://github.com/microsoft/playwright-java.git
synced 2026-04-21 14:01:05 +00:00
chore: resolve Object langAliases in function argument types (#1908)
This commit is contained in:
parent
7dbd6cac3b
commit
b01bf64e64
@ -10,7 +10,7 @@
|
||||
<name>Playwright Client Examples</name>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<playwright.version>1.58.0</playwright.version>
|
||||
<playwright.version>1.59.0</playwright.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
||||
@ -1 +1 @@
|
||||
1.59.1-beta-1775752988000
|
||||
1.59.1-beta-1775762078000
|
||||
|
||||
@ -506,6 +506,12 @@ class TypeRef extends Element {
|
||||
if (customType != null) {
|
||||
return customType;
|
||||
}
|
||||
// Inner Objects (e.g. function arguments) are not visited by createClassesAndEnums,
|
||||
// so resolve their Java type name from langAliases here.
|
||||
String alias = javaAlias(jsonType);
|
||||
if (alias != null) {
|
||||
return alias;
|
||||
}
|
||||
return "Map<" + convertTemplateParams(jsonType) + ">";
|
||||
}
|
||||
if ("Map".equals(name)) {
|
||||
@ -525,9 +531,6 @@ class TypeRef extends Element {
|
||||
if ("WebSocketRoute.onClose.handler".equals(jsonPath)) {
|
||||
return "BiConsumer<Integer, String>";
|
||||
}
|
||||
if ("Screencast.start.options.onFrame".equals(jsonPath)) {
|
||||
return "Consumer<ScreencastFrame>";
|
||||
}
|
||||
if (jsonType.getAsJsonArray("args").size() == 1) {
|
||||
String paramType = convertBuiltinType(jsonType.getAsJsonArray("args").get(0).getAsJsonObject());
|
||||
if (!jsonType.has("returnType") || jsonType.get("returnType").isJsonNull()) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user