diff --git a/.github/workflows/okhttp.yaml b/.github/workflows/okhttp.yaml index e20a039ce9..367bcf2732 100644 --- a/.github/workflows/okhttp.yaml +++ b/.github/workflows/okhttp.yaml @@ -55,4 +55,4 @@ jobs: # - pkgs/ok_http/example/android/app/build.gradle api-level: 21 arch: x86_64 - script: cd pkgs/ok_http/example && flutter test --timeout=120s integration_test/ + script: cd pkgs/ok_http/example && flutter test --timeout=1200s integration_test/ diff --git a/pkgs/ok_http/CHANGELOG.md b/pkgs/ok_http/CHANGELOG.md index 433fc4ec44..557f19db20 100644 --- a/pkgs/ok_http/CHANGELOG.md +++ b/pkgs/ok_http/CHANGELOG.md @@ -1,5 +1,6 @@ -## 0.1.0-wip +## 0.1.0 - Implementation of [`BaseClient`](https://pub.dev/documentation/http/latest/http/BaseClient-class.html) and `send()` method using [`enqueue()` API](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-call/enqueue.html) - `ok_http` can now send asynchronous requests and stream response bodies. - Add [DevTools Network View](https://docs.flutter.dev/tools/devtools/network) support. +- WebSockets support is now available in the `ok_http` package. Wraps around the OkHttp [WebSocket API](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-web-socket/index.html). diff --git a/pkgs/ok_http/README.md b/pkgs/ok_http/README.md index 6c21d824e7..513234815e 100644 --- a/pkgs/ok_http/README.md +++ b/pkgs/ok_http/README.md @@ -1,8 +1,8 @@ -[![pub package](https://img.shields.io/pub/v/cronet_http.svg)](https://pub.dev/packages/ok_http) +[![pub package](https://img.shields.io/pub/v/ok_http.svg)](https://pub.dev/packages/ok_http) [![package publisher](https://img.shields.io/pub/publisher/ok_http.svg)](https://pub.dev/packages/ok_http/publisher) An Android Flutter plugin that provides access to the -[OkHttp][] HTTP client. +[OkHttp][] HTTP client and the OkHttp [WebSocket][] API. ## Why use `package:ok_http`? @@ -23,6 +23,35 @@ This size of the [example application][] APK file using different packages: [^2]: Embeds the Cronet HTTP library. [^3]: Accessed through [`IOClient`](https://pub.dev/documentation/http/latest/io_client/IOClient-class.html). +### 🔌 Supports WebSockets out of the box + +`package:ok_http` wraps the OkHttp [WebSocket][] API which supports: + +- Configured System Proxy on Android +- HTTP/2 + +**Example Usage of `OkHttpWebSocket`:** + +```dart +import 'package:ok_http/ok_http.dart'; +import 'package:web_socket/web_socket.dart'; +void main() async { + final socket = await OkHttpWebSocket.connect( + Uri.parse('wss://ws.postman-echo.com/raw')); + socket.events.listen((e) async { + switch (e) { + case TextDataReceived(text: final text): + print('Received Text: $text'); + await socket.close(); + case BinaryDataReceived(data: final data): + print('Received Binary: $data'); + case CloseReceived(code: final code, reason: final reason): + print('Connection to server closed: $code [$reason]'); + } + }); +} +``` + ## Status: experimental **NOTE**: This package is currently experimental and published under the @@ -41,3 +70,4 @@ feedback, suggestions, and comments, please file an issue in the [example application]: https://github.com/dart-lang/http/tree/master/pkgs/flutter_http_example [OkHttp]: https://square.github.io/okhttp/ [Google Play Services]: https://developers.google.com/android/guides/overview +[WebSocket]: https://square.github.io/okhttp/5.x/okhttp/okhttp3/-web-socket/index.html diff --git a/pkgs/ok_http/analysis_options.yaml b/pkgs/ok_http/analysis_options.yaml deleted file mode 100644 index 8de8919f97..0000000000 --- a/pkgs/ok_http/analysis_options.yaml +++ /dev/null @@ -1,5 +0,0 @@ -include: ../../analysis_options.yaml - -analyzer: - exclude: - - "lib/src/jni/bindings.dart" diff --git a/pkgs/ok_http/android/src/main/kotlin/com/example/ok_http/WebSocketInterceptor.kt b/pkgs/ok_http/android/src/main/kotlin/com/example/ok_http/WebSocketInterceptor.kt new file mode 100644 index 0000000000..da64591576 --- /dev/null +++ b/pkgs/ok_http/android/src/main/kotlin/com/example/ok_http/WebSocketInterceptor.kt @@ -0,0 +1,33 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +package com.example.ok_http + +import okhttp3.Interceptor +import okhttp3.OkHttpClient + +/** + * Usage of `chain.proceed(...)` via JNI Bindings leads to threading issues. This is a workaround + * to intercept the response before it is parsed by the WebSocketReader, to prevent response parsing errors. + * + * https://github.com/dart-lang/native/issues/1337 + */ +class WebSocketInterceptor { + companion object { + fun addWSInterceptor( + clientBuilder: OkHttpClient.Builder + ): OkHttpClient.Builder { + return clientBuilder.addInterceptor(Interceptor { chain -> + val request = chain.request() + val response = chain.proceed(request) + + response.newBuilder() + // Removing this header to ensure that OkHttp does not fail due to unexpected values. + .removeHeader("sec-websocket-extensions") + // Adding the header to ensure successful parsing of the response. + .addHeader("sec-websocket-extensions", "permessage-deflate").build() + }) + } + } +} diff --git a/pkgs/ok_http/android/src/main/kotlin/com/example/ok_http/WebSocketListenerProxy.kt b/pkgs/ok_http/android/src/main/kotlin/com/example/ok_http/WebSocketListenerProxy.kt new file mode 100644 index 0000000000..e0366c78be --- /dev/null +++ b/pkgs/ok_http/android/src/main/kotlin/com/example/ok_http/WebSocketListenerProxy.kt @@ -0,0 +1,51 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +package com.example.ok_http + +import okhttp3.Response +import okhttp3.WebSocket +import okhttp3.WebSocketListener +import okio.ByteString + +/** + * `OkHttp` expects a subclass of the abstract class [`WebSocketListener`](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-web-socket-listener/index.html) + * to be passed to the `newWebSocket` method. + * + * `package:jnigen` does not support the ability to subclass abstract Java classes in Dart + * (see https://github.com/dart-lang/jnigen/issues/348). + * + * This file provides an interface `WebSocketListener`, which can + * be implemented in Dart and a wrapper class `WebSocketListenerProxy`, which + * can be passed to the OkHttp API. + */ +class WebSocketListenerProxy(private val listener: WebSocketListener) : WebSocketListener() { + interface WebSocketListener { + fun onOpen(webSocket: WebSocket, response: Response) + fun onMessage(webSocket: WebSocket, text: String) + fun onMessage(webSocket: WebSocket, bytes: ByteString) + fun onClosing(webSocket: WebSocket, code: Int, reason: String) + fun onFailure(webSocket: WebSocket, t: Throwable, response: Response?) + } + + override fun onOpen(webSocket: WebSocket, response: Response) { + listener.onOpen(webSocket, response) + } + + override fun onMessage(webSocket: WebSocket, text: String) { + listener.onMessage(webSocket, text) + } + + override fun onMessage(webSocket: WebSocket, bytes: ByteString) { + listener.onMessage(webSocket, bytes) + } + + override fun onClosing(webSocket: WebSocket, code: Int, reason: String) { + listener.onClosing(webSocket, code, reason) + } + + override fun onFailure(webSocket: WebSocket, t: Throwable, response: Response?) { + listener.onFailure(webSocket, t, response) + } +} diff --git a/pkgs/ok_http/example/integration_test/web_socket_test.dart b/pkgs/ok_http/example/integration_test/web_socket_test.dart new file mode 100644 index 0000000000..8f1a9656f8 --- /dev/null +++ b/pkgs/ok_http/example/integration_test/web_socket_test.dart @@ -0,0 +1,10 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:ok_http/ok_http.dart'; +import 'package:web_socket_conformance_tests/web_socket_conformance_tests.dart'; + +void main() { + testAll(OkHttpWebSocket.connect); +} diff --git a/pkgs/ok_http/example/pubspec.yaml b/pkgs/ok_http/example/pubspec.yaml index f7c9dc1ecb..8a394364fe 100644 --- a/pkgs/ok_http/example/pubspec.yaml +++ b/pkgs/ok_http/example/pubspec.yaml @@ -16,6 +16,7 @@ dependencies: ok_http: path: ../ provider: ^6.1.1 + web_socket: ^0.1.5 dev_dependencies: dart_flutter_team_lints: ^3.0.0 @@ -27,6 +28,8 @@ dev_dependencies: integration_test: sdk: flutter test: ^1.23.1 + web_socket_conformance_tests: + path: ../../web_socket_conformance_tests/ flutter: uses-material-design: true diff --git a/pkgs/ok_http/jnigen.yaml b/pkgs/ok_http/jnigen.yaml index c9f06d183a..7f63d6c2d9 100644 --- a/pkgs/ok_http/jnigen.yaml +++ b/pkgs/ok_http/jnigen.yaml @@ -26,11 +26,16 @@ classes: - "okhttp3.Callback" - "okhttp3.ConnectionPool" - "okhttp3.Dispatcher" + - "java.util.concurrent.ExecutorService" - "okhttp3.Cache" - "com.example.ok_http.RedirectReceivedCallback" - "com.example.ok_http.RedirectInterceptor" - "com.example.ok_http.AsyncInputStreamReader" - "com.example.ok_http.DataCallback" + - "okhttp3.WebSocket" + - "com.example.ok_http.WebSocketListenerProxy" + - "okio.ByteString" + - "com.example.ok_http.WebSocketInterceptor" # Exclude the deprecated methods listed below # They cause syntax errors during the `dart format` step of JNIGen. @@ -86,3 +91,19 @@ exclude: - "okhttp3.Headers#-deprecated_size" - "okhttp3.Dispatcher#-deprecated_executorService" - "okhttp3.Cache#-deprecated_directory" + - "java.util.concurrent.ExecutorService#invokeAll" + - "java.util.concurrent.ExecutorService#invokeAny" + - "java.util.concurrent.ExecutorService#submit" + - "okio.ByteString$Companion#-deprecated_getByte" + - "okio.ByteString$Companion#-deprecated_size" + - 'okio.ByteString\$Companion#-deprecated_decodeBase64' + - 'okio.ByteString\$Companion#-deprecated_decodeHex' + - 'okio.ByteString\$Companion#-deprecated_encodeString' + - 'okio.ByteString\$Companion#-deprecated_encodeUtf8' + - 'okio.ByteString\$Companion#-deprecated_of' + - 'okio.ByteString\$Companion#-deprecated_read' + - "okio.ByteString#-deprecated_getByte" + - "okio.ByteString#-deprecated_size" + +preamble: | + // ignore_for_file: prefer_expression_function_bodies diff --git a/pkgs/ok_http/lib/ok_http.dart b/pkgs/ok_http/lib/ok_http.dart index 891ec98463..75b43ae8a5 100644 --- a/pkgs/ok_http/lib/ok_http.dart +++ b/pkgs/ok_http/lib/ok_http.dart @@ -3,7 +3,9 @@ // BSD-style license that can be found in the LICENSE file. /// An Android Flutter plugin that provides access to the -/// [OkHttp](https://square.github.io/okhttp/) HTTP client. +/// [OkHttp](https://square.github.io/okhttp/) HTTP client, and the OkHttp +/// [WebSocket](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-web-socket/index.html) +/// API /// /// ``` /// import 'package:ok_http/ok_http.dart'; @@ -53,3 +55,4 @@ import 'package:http/http.dart'; import 'src/ok_http_client.dart'; export 'src/ok_http_client.dart'; +export 'src/ok_http_web_socket.dart'; diff --git a/pkgs/ok_http/lib/src/jni/bindings.dart b/pkgs/ok_http/lib/src/jni/bindings.dart index 05ab7b830e..66f0078d9a 100644 --- a/pkgs/ok_http/lib/src/jni/bindings.dart +++ b/pkgs/ok_http/lib/src/jni/bindings.dart @@ -1,6 +1,9 @@ +// ignore_for_file: prefer_expression_function_bodies + // Autogenerated by jnigen. DO NOT EDIT! // ignore_for_file: annotate_overrides +// ignore_for_file: argument_type_not_assignable // ignore_for_file: camel_case_extensions // ignore_for_file: camel_case_types // ignore_for_file: constant_identifier_names @@ -9,8 +12,11 @@ // ignore_for_file: lines_longer_than_80_chars // ignore_for_file: no_leading_underscores_for_local_identifiers // ignore_for_file: non_constant_identifier_names +// ignore_for_file: only_throw_errors // ignore_for_file: overridden_fields +// ignore_for_file: prefer_double_quotes // ignore_for_file: unnecessary_cast +// ignore_for_file: unnecessary_parenthesis // ignore_for_file: unused_element // ignore_for_file: unused_field // ignore_for_file: unused_import @@ -18,10 +24,11 @@ // ignore_for_file: unused_shown_name // ignore_for_file: use_super_parameters -import "dart:isolate" show ReceivePort; -import "dart:ffi" as ffi; -import "package:jni/internal_helpers_for_jnigen.dart"; -import "package:jni/jni.dart" as jni; +import 'dart:ffi' as ffi; +import 'dart:isolate' show ReceivePort; + +import 'package:jni/internal_helpers_for_jnigen.dart'; +import 'package:jni/jni.dart' as jni; /// from: okhttp3.Request$Builder class Request_Builder extends jni.JObject { @@ -32,12 +39,12 @@ class Request_Builder extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/Request$Builder"); + static final _class = jni.JClass.forName(r'okhttp3/Request$Builder'); /// The type which includes information such as the signature of this class. static const type = $Request_BuilderType(); static final _id_new0 = _class.constructorId( - r"()V", + r'()V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -45,7 +52,7 @@ class Request_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_NewObject") + )>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -61,7 +68,7 @@ class Request_Builder extends jni.JObject { } static final _id_new1 = _class.constructorId( - r"(Lokhttp3/Request;)V", + r'(Lokhttp3/Request;)V', ); static final _new1 = ProtectedJniExtensions.lookup< @@ -70,7 +77,7 @@ class Request_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") + 'globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -86,8 +93,8 @@ class Request_Builder extends jni.JObject { } static final _id_url = _class.instanceMethodId( - r"url", - r"(Lokhttp3/HttpUrl;)Lokhttp3/Request$Builder;", + r'url', + r'(Lokhttp3/HttpUrl;)Lokhttp3/Request$Builder;', ); static final _url = ProtectedJniExtensions.lookup< @@ -96,7 +103,7 @@ class Request_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -112,8 +119,8 @@ class Request_Builder extends jni.JObject { } static final _id_url1 = _class.instanceMethodId( - r"url", - r"(Ljava/lang/String;)Lokhttp3/Request$Builder;", + r'url', + r'(Ljava/lang/String;)Lokhttp3/Request$Builder;', ); static final _url1 = ProtectedJniExtensions.lookup< @@ -122,7 +129,7 @@ class Request_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -138,8 +145,8 @@ class Request_Builder extends jni.JObject { } static final _id_url2 = _class.instanceMethodId( - r"url", - r"(Ljava/net/URL;)Lokhttp3/Request$Builder;", + r'url', + r'(Ljava/net/URL;)Lokhttp3/Request$Builder;', ); static final _url2 = ProtectedJniExtensions.lookup< @@ -148,7 +155,7 @@ class Request_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -164,8 +171,8 @@ class Request_Builder extends jni.JObject { } static final _id_header = _class.instanceMethodId( - r"header", - r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder;", + r'header', + r'(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder;', ); static final _header = ProtectedJniExtensions.lookup< @@ -177,7 +184,7 @@ class Request_Builder extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -194,8 +201,8 @@ class Request_Builder extends jni.JObject { } static final _id_addHeader = _class.instanceMethodId( - r"addHeader", - r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder;", + r'addHeader', + r'(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder;', ); static final _addHeader = ProtectedJniExtensions.lookup< @@ -207,7 +214,7 @@ class Request_Builder extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -224,8 +231,8 @@ class Request_Builder extends jni.JObject { } static final _id_removeHeader = _class.instanceMethodId( - r"removeHeader", - r"(Ljava/lang/String;)Lokhttp3/Request$Builder;", + r'removeHeader', + r'(Ljava/lang/String;)Lokhttp3/Request$Builder;', ); static final _removeHeader = ProtectedJniExtensions.lookup< @@ -234,7 +241,7 @@ class Request_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -250,8 +257,8 @@ class Request_Builder extends jni.JObject { } static final _id_headers = _class.instanceMethodId( - r"headers", - r"(Lokhttp3/Headers;)Lokhttp3/Request$Builder;", + r'headers', + r'(Lokhttp3/Headers;)Lokhttp3/Request$Builder;', ); static final _headers = ProtectedJniExtensions.lookup< @@ -260,7 +267,7 @@ class Request_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -276,8 +283,8 @@ class Request_Builder extends jni.JObject { } static final _id_cacheControl = _class.instanceMethodId( - r"cacheControl", - r"(Lokhttp3/CacheControl;)Lokhttp3/Request$Builder;", + r'cacheControl', + r'(Lokhttp3/CacheControl;)Lokhttp3/Request$Builder;', ); static final _cacheControl = ProtectedJniExtensions.lookup< @@ -286,7 +293,7 @@ class Request_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -304,8 +311,8 @@ class Request_Builder extends jni.JObject { } static final _id_get0 = _class.instanceMethodId( - r"get", - r"()Lokhttp3/Request$Builder;", + r'get', + r'()Lokhttp3/Request$Builder;', ); static final _get0 = ProtectedJniExtensions.lookup< @@ -313,7 +320,7 @@ class Request_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -328,8 +335,8 @@ class Request_Builder extends jni.JObject { } static final _id_head = _class.instanceMethodId( - r"head", - r"()Lokhttp3/Request$Builder;", + r'head', + r'()Lokhttp3/Request$Builder;', ); static final _head = ProtectedJniExtensions.lookup< @@ -337,7 +344,7 @@ class Request_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -352,8 +359,8 @@ class Request_Builder extends jni.JObject { } static final _id_post = _class.instanceMethodId( - r"post", - r"(Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;", + r'post', + r'(Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;', ); static final _post = ProtectedJniExtensions.lookup< @@ -362,7 +369,7 @@ class Request_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -378,8 +385,8 @@ class Request_Builder extends jni.JObject { } static final _id_delete = _class.instanceMethodId( - r"delete", - r"(Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;", + r'delete', + r'(Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;', ); static final _delete = ProtectedJniExtensions.lookup< @@ -388,7 +395,7 @@ class Request_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -404,8 +411,8 @@ class Request_Builder extends jni.JObject { } static final _id_put = _class.instanceMethodId( - r"put", - r"(Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;", + r'put', + r'(Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;', ); static final _put = ProtectedJniExtensions.lookup< @@ -414,7 +421,7 @@ class Request_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -430,8 +437,8 @@ class Request_Builder extends jni.JObject { } static final _id_patch = _class.instanceMethodId( - r"patch", - r"(Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;", + r'patch', + r'(Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;', ); static final _patch = ProtectedJniExtensions.lookup< @@ -440,7 +447,7 @@ class Request_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -456,8 +463,8 @@ class Request_Builder extends jni.JObject { } static final _id_method = _class.instanceMethodId( - r"method", - r"(Ljava/lang/String;Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;", + r'method', + r'(Ljava/lang/String;Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;', ); static final _method = ProtectedJniExtensions.lookup< @@ -469,7 +476,7 @@ class Request_Builder extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -486,8 +493,8 @@ class Request_Builder extends jni.JObject { } static final _id_tag = _class.instanceMethodId( - r"tag", - r"(Ljava/lang/Object;)Lokhttp3/Request$Builder;", + r'tag', + r'(Ljava/lang/Object;)Lokhttp3/Request$Builder;', ); static final _tag = ProtectedJniExtensions.lookup< @@ -496,7 +503,7 @@ class Request_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -512,8 +519,8 @@ class Request_Builder extends jni.JObject { } static final _id_tag1 = _class.instanceMethodId( - r"tag", - r"(Ljava/lang/Class;Ljava/lang/Object;)Lokhttp3/Request$Builder;", + r'tag', + r'(Ljava/lang/Class;Ljava/lang/Object;)Lokhttp3/Request$Builder;', ); static final _tag1 = ProtectedJniExtensions.lookup< @@ -525,7 +532,7 @@ class Request_Builder extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -546,8 +553,8 @@ class Request_Builder extends jni.JObject { } static final _id_build = _class.instanceMethodId( - r"build", - r"()Lokhttp3/Request;", + r'build', + r'()Lokhttp3/Request;', ); static final _build = ProtectedJniExtensions.lookup< @@ -555,7 +562,7 @@ class Request_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -570,8 +577,8 @@ class Request_Builder extends jni.JObject { } static final _id_delete1 = _class.instanceMethodId( - r"delete", - r"()Lokhttp3/Request$Builder;", + r'delete', + r'()Lokhttp3/Request$Builder;', ); static final _delete1 = ProtectedJniExtensions.lookup< @@ -579,7 +586,7 @@ class Request_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -598,7 +605,7 @@ final class $Request_BuilderType extends jni.JObjType { const $Request_BuilderType(); @override - String get signature => r"Lokhttp3/Request$Builder;"; + String get signature => r'Lokhttp3/Request$Builder;'; @override Request_Builder fromReference(jni.JReference reference) => @@ -629,12 +636,12 @@ class Request extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/Request"); + static final _class = jni.JClass.forName(r'okhttp3/Request'); /// The type which includes information such as the signature of this class. static const type = $RequestType(); static final _id_new0 = _class.constructorId( - r"(Lokhttp3/HttpUrl;Ljava/lang/String;Lokhttp3/Headers;Lokhttp3/RequestBody;Ljava/util/Map;)V", + r'(Lokhttp3/HttpUrl;Ljava/lang/String;Lokhttp3/Headers;Lokhttp3/RequestBody;Ljava/util/Map;)V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -649,7 +656,7 @@ class Request extends jni.JObject { ffi.Pointer, ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_NewObject") + )>)>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -681,8 +688,8 @@ class Request extends jni.JObject { } static final _id_url = _class.instanceMethodId( - r"url", - r"()Lokhttp3/HttpUrl;", + r'url', + r'()Lokhttp3/HttpUrl;', ); static final _url = ProtectedJniExtensions.lookup< @@ -690,7 +697,7 @@ class Request extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -705,8 +712,8 @@ class Request extends jni.JObject { } static final _id_method = _class.instanceMethodId( - r"method", - r"()Ljava/lang/String;", + r'method', + r'()Ljava/lang/String;', ); static final _method = ProtectedJniExtensions.lookup< @@ -714,7 +721,7 @@ class Request extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -729,8 +736,8 @@ class Request extends jni.JObject { } static final _id_headers = _class.instanceMethodId( - r"headers", - r"()Lokhttp3/Headers;", + r'headers', + r'()Lokhttp3/Headers;', ); static final _headers = ProtectedJniExtensions.lookup< @@ -738,7 +745,7 @@ class Request extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -753,8 +760,8 @@ class Request extends jni.JObject { } static final _id_body = _class.instanceMethodId( - r"body", - r"()Lokhttp3/RequestBody;", + r'body', + r'()Lokhttp3/RequestBody;', ); static final _body = ProtectedJniExtensions.lookup< @@ -762,7 +769,7 @@ class Request extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -777,8 +784,8 @@ class Request extends jni.JObject { } static final _id_isHttps = _class.instanceMethodId( - r"isHttps", - r"()Z", + r'isHttps', + r'()Z', ); static final _isHttps = ProtectedJniExtensions.lookup< @@ -786,7 +793,7 @@ class Request extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallBooleanMethod") + )>>('globalEnv_CallBooleanMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -799,8 +806,8 @@ class Request extends jni.JObject { } static final _id_header = _class.instanceMethodId( - r"header", - r"(Ljava/lang/String;)Ljava/lang/String;", + r'header', + r'(Ljava/lang/String;)Ljava/lang/String;', ); static final _header = ProtectedJniExtensions.lookup< @@ -809,7 +816,7 @@ class Request extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -825,8 +832,8 @@ class Request extends jni.JObject { } static final _id_headers1 = _class.instanceMethodId( - r"headers", - r"(Ljava/lang/String;)Ljava/util/List;", + r'headers', + r'(Ljava/lang/String;)Ljava/util/List;', ); static final _headers1 = ProtectedJniExtensions.lookup< @@ -835,7 +842,7 @@ class Request extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -851,8 +858,8 @@ class Request extends jni.JObject { } static final _id_tag = _class.instanceMethodId( - r"tag", - r"()Ljava/lang/Object;", + r'tag', + r'()Ljava/lang/Object;', ); static final _tag = ProtectedJniExtensions.lookup< @@ -860,7 +867,7 @@ class Request extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -875,8 +882,8 @@ class Request extends jni.JObject { } static final _id_tag1 = _class.instanceMethodId( - r"tag", - r"(Ljava/lang/Class;)Ljava/lang/Object;", + r'tag', + r'(Ljava/lang/Class;)Ljava/lang/Object;', ); static final _tag1 = ProtectedJniExtensions.lookup< @@ -885,7 +892,7 @@ class Request extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -902,8 +909,8 @@ class Request extends jni.JObject { } static final _id_newBuilder = _class.instanceMethodId( - r"newBuilder", - r"()Lokhttp3/Request$Builder;", + r'newBuilder', + r'()Lokhttp3/Request$Builder;', ); static final _newBuilder = ProtectedJniExtensions.lookup< @@ -911,7 +918,7 @@ class Request extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -926,8 +933,8 @@ class Request extends jni.JObject { } static final _id_cacheControl = _class.instanceMethodId( - r"cacheControl", - r"()Lokhttp3/CacheControl;", + r'cacheControl', + r'()Lokhttp3/CacheControl;', ); static final _cacheControl = ProtectedJniExtensions.lookup< @@ -935,7 +942,7 @@ class Request extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -951,8 +958,8 @@ class Request extends jni.JObject { } static final _id_toString1 = _class.instanceMethodId( - r"toString", - r"()Ljava/lang/String;", + r'toString', + r'()Ljava/lang/String;', ); static final _toString1 = ProtectedJniExtensions.lookup< @@ -960,7 +967,7 @@ class Request extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -979,7 +986,7 @@ final class $RequestType extends jni.JObjType { const $RequestType(); @override - String get signature => r"Lokhttp3/Request;"; + String get signature => r'Lokhttp3/Request;'; @override Request fromReference(jni.JReference reference) => @@ -1009,13 +1016,13 @@ class RequestBody_Companion extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/RequestBody$Companion"); + static final _class = jni.JClass.forName(r'okhttp3/RequestBody$Companion'); /// The type which includes information such as the signature of this class. static const type = $RequestBody_CompanionType(); static final _id_create = _class.instanceMethodId( - r"create", - r"(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/RequestBody;", + r'create', + r'(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/RequestBody;', ); static final _create = ProtectedJniExtensions.lookup< @@ -1027,7 +1034,7 @@ class RequestBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -1044,8 +1051,8 @@ class RequestBody_Companion extends jni.JObject { } static final _id_create1 = _class.instanceMethodId( - r"create", - r"(Lokio/ByteString;Lokhttp3/MediaType;)Lokhttp3/RequestBody;", + r'create', + r'(Lokio/ByteString;Lokhttp3/MediaType;)Lokhttp3/RequestBody;', ); static final _create1 = ProtectedJniExtensions.lookup< @@ -1057,7 +1064,7 @@ class RequestBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -1065,7 +1072,7 @@ class RequestBody_Companion extends jni.JObject { /// from: public final okhttp3.RequestBody create(okio.ByteString byteString, okhttp3.MediaType mediaType) /// The returned object must be released after use, by calling the [release] method. RequestBody create1( - jni.JObject byteString, + ByteString byteString, jni.JObject mediaType, ) { return _create1(reference.pointer, _id_create1 as jni.JMethodIDPtr, @@ -1074,8 +1081,8 @@ class RequestBody_Companion extends jni.JObject { } static final _id_create2 = _class.instanceMethodId( - r"create", - r"([BLokhttp3/MediaType;II)Lokhttp3/RequestBody;", + r'create', + r'([BLokhttp3/MediaType;II)Lokhttp3/RequestBody;', ); static final _create2 = ProtectedJniExtensions.lookup< @@ -1087,9 +1094,9 @@ class RequestBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Int32 - )>)>>("globalEnv_CallObjectMethod") + $Int32, + $Int32 + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer, int, int)>(); @@ -1108,8 +1115,8 @@ class RequestBody_Companion extends jni.JObject { } static final _id_create3 = _class.instanceMethodId( - r"create", - r"(Ljava/io/File;Lokhttp3/MediaType;)Lokhttp3/RequestBody;", + r'create', + r'(Ljava/io/File;Lokhttp3/MediaType;)Lokhttp3/RequestBody;', ); static final _create3 = ProtectedJniExtensions.lookup< @@ -1121,7 +1128,7 @@ class RequestBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -1138,8 +1145,8 @@ class RequestBody_Companion extends jni.JObject { } static final _id_create4 = _class.instanceMethodId( - r"create", - r"(Lokhttp3/MediaType;Ljava/lang/String;)Lokhttp3/RequestBody;", + r'create', + r'(Lokhttp3/MediaType;Ljava/lang/String;)Lokhttp3/RequestBody;', ); static final _create4 = ProtectedJniExtensions.lookup< @@ -1151,7 +1158,7 @@ class RequestBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -1168,8 +1175,8 @@ class RequestBody_Companion extends jni.JObject { } static final _id_create5 = _class.instanceMethodId( - r"create", - r"(Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/RequestBody;", + r'create', + r'(Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/RequestBody;', ); static final _create5 = ProtectedJniExtensions.lookup< @@ -1181,7 +1188,7 @@ class RequestBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -1190,7 +1197,7 @@ class RequestBody_Companion extends jni.JObject { /// The returned object must be released after use, by calling the [release] method. RequestBody create5( jni.JObject mediaType, - jni.JObject byteString, + ByteString byteString, ) { return _create5(reference.pointer, _id_create5 as jni.JMethodIDPtr, mediaType.reference.pointer, byteString.reference.pointer) @@ -1198,8 +1205,8 @@ class RequestBody_Companion extends jni.JObject { } static final _id_create6 = _class.instanceMethodId( - r"create", - r"(Lokhttp3/MediaType;[BII)Lokhttp3/RequestBody;", + r'create', + r'(Lokhttp3/MediaType;[BII)Lokhttp3/RequestBody;', ); static final _create6 = ProtectedJniExtensions.lookup< @@ -1211,9 +1218,9 @@ class RequestBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Int32 - )>)>>("globalEnv_CallObjectMethod") + $Int32, + $Int32 + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer, int, int)>(); @@ -1232,8 +1239,8 @@ class RequestBody_Companion extends jni.JObject { } static final _id_create7 = _class.instanceMethodId( - r"create", - r"(Lokhttp3/MediaType;Ljava/io/File;)Lokhttp3/RequestBody;", + r'create', + r'(Lokhttp3/MediaType;Ljava/io/File;)Lokhttp3/RequestBody;', ); static final _create7 = ProtectedJniExtensions.lookup< @@ -1245,7 +1252,7 @@ class RequestBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -1262,8 +1269,8 @@ class RequestBody_Companion extends jni.JObject { } static final _id_create8 = _class.instanceMethodId( - r"create", - r"([BLokhttp3/MediaType;I)Lokhttp3/RequestBody;", + r'create', + r'([BLokhttp3/MediaType;I)Lokhttp3/RequestBody;', ); static final _create8 = ProtectedJniExtensions.lookup< @@ -1275,8 +1282,8 @@ class RequestBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer, - ffi.Int32 - )>)>>("globalEnv_CallObjectMethod") + $Int32 + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer, int)>(); @@ -1294,8 +1301,8 @@ class RequestBody_Companion extends jni.JObject { } static final _id_create9 = _class.instanceMethodId( - r"create", - r"([BLokhttp3/MediaType;)Lokhttp3/RequestBody;", + r'create', + r'([BLokhttp3/MediaType;)Lokhttp3/RequestBody;', ); static final _create9 = ProtectedJniExtensions.lookup< @@ -1307,7 +1314,7 @@ class RequestBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -1324,8 +1331,8 @@ class RequestBody_Companion extends jni.JObject { } static final _id_create10 = _class.instanceMethodId( - r"create", - r"([B)Lokhttp3/RequestBody;", + r'create', + r'([B)Lokhttp3/RequestBody;', ); static final _create10 = ProtectedJniExtensions.lookup< @@ -1334,7 +1341,7 @@ class RequestBody_Companion extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -1350,8 +1357,8 @@ class RequestBody_Companion extends jni.JObject { } static final _id_create11 = _class.instanceMethodId( - r"create", - r"(Lokhttp3/MediaType;[BI)Lokhttp3/RequestBody;", + r'create', + r'(Lokhttp3/MediaType;[BI)Lokhttp3/RequestBody;', ); static final _create11 = ProtectedJniExtensions.lookup< @@ -1363,8 +1370,8 @@ class RequestBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer, - ffi.Int32 - )>)>>("globalEnv_CallObjectMethod") + $Int32 + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer, int)>(); @@ -1382,8 +1389,8 @@ class RequestBody_Companion extends jni.JObject { } static final _id_create12 = _class.instanceMethodId( - r"create", - r"(Lokhttp3/MediaType;[B)Lokhttp3/RequestBody;", + r'create', + r'(Lokhttp3/MediaType;[B)Lokhttp3/RequestBody;', ); static final _create12 = ProtectedJniExtensions.lookup< @@ -1395,7 +1402,7 @@ class RequestBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -1412,7 +1419,7 @@ class RequestBody_Companion extends jni.JObject { } static final _id_new0 = _class.constructorId( - r"(Lkotlin/jvm/internal/DefaultConstructorMarker;)V", + r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -1421,7 +1428,7 @@ class RequestBody_Companion extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") + 'globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -1444,7 +1451,7 @@ final class $RequestBody_CompanionType const $RequestBody_CompanionType(); @override - String get signature => r"Lokhttp3/RequestBody$Companion;"; + String get signature => r'Lokhttp3/RequestBody$Companion;'; @override RequestBody_Companion fromReference(jni.JReference reference) => @@ -1475,13 +1482,13 @@ class RequestBody extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/RequestBody"); + static final _class = jni.JClass.forName(r'okhttp3/RequestBody'); /// The type which includes information such as the signature of this class. static const type = $RequestBodyType(); static final _id_Companion = _class.staticFieldId( - r"Companion", - r"Lokhttp3/RequestBody$Companion;", + r'Companion', + r'Lokhttp3/RequestBody$Companion;', ); /// from: static public final okhttp3.RequestBody$Companion Companion @@ -1490,7 +1497,7 @@ class RequestBody extends jni.JObject { _id_Companion.get(_class, const $RequestBody_CompanionType()); static final _id_new0 = _class.constructorId( - r"()V", + r'()V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -1498,7 +1505,7 @@ class RequestBody extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_NewObject") + )>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -1514,8 +1521,8 @@ class RequestBody extends jni.JObject { } static final _id_contentType = _class.instanceMethodId( - r"contentType", - r"()Lokhttp3/MediaType;", + r'contentType', + r'()Lokhttp3/MediaType;', ); static final _contentType = ProtectedJniExtensions.lookup< @@ -1523,7 +1530,7 @@ class RequestBody extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -1538,8 +1545,8 @@ class RequestBody extends jni.JObject { } static final _id_contentLength = _class.instanceMethodId( - r"contentLength", - r"()J", + r'contentLength', + r'()J', ); static final _contentLength = ProtectedJniExtensions.lookup< @@ -1547,7 +1554,7 @@ class RequestBody extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallLongMethod") + )>>('globalEnv_CallLongMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -1562,8 +1569,8 @@ class RequestBody extends jni.JObject { } static final _id_writeTo = _class.instanceMethodId( - r"writeTo", - r"(Lokio/BufferedSink;)V", + r'writeTo', + r'(Lokio/BufferedSink;)V', ); static final _writeTo = ProtectedJniExtensions.lookup< @@ -1572,7 +1579,7 @@ class RequestBody extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallVoidMethod") + 'globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -1587,8 +1594,8 @@ class RequestBody extends jni.JObject { } static final _id_isDuplex = _class.instanceMethodId( - r"isDuplex", - r"()Z", + r'isDuplex', + r'()Z', ); static final _isDuplex = ProtectedJniExtensions.lookup< @@ -1596,7 +1603,7 @@ class RequestBody extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallBooleanMethod") + )>>('globalEnv_CallBooleanMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -1610,8 +1617,8 @@ class RequestBody extends jni.JObject { } static final _id_isOneShot = _class.instanceMethodId( - r"isOneShot", - r"()Z", + r'isOneShot', + r'()Z', ); static final _isOneShot = ProtectedJniExtensions.lookup< @@ -1619,7 +1626,7 @@ class RequestBody extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallBooleanMethod") + )>>('globalEnv_CallBooleanMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -1633,8 +1640,8 @@ class RequestBody extends jni.JObject { } static final _id_create = _class.staticMethodId( - r"create", - r"(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/RequestBody;", + r'create', + r'(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/RequestBody;', ); static final _create = ProtectedJniExtensions.lookup< @@ -1646,7 +1653,7 @@ class RequestBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -1663,8 +1670,8 @@ class RequestBody extends jni.JObject { } static final _id_create1 = _class.staticMethodId( - r"create", - r"(Lokio/ByteString;Lokhttp3/MediaType;)Lokhttp3/RequestBody;", + r'create', + r'(Lokio/ByteString;Lokhttp3/MediaType;)Lokhttp3/RequestBody;', ); static final _create1 = ProtectedJniExtensions.lookup< @@ -1676,7 +1683,7 @@ class RequestBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -1684,7 +1691,7 @@ class RequestBody extends jni.JObject { /// from: static public final okhttp3.RequestBody create(okio.ByteString byteString, okhttp3.MediaType mediaType) /// The returned object must be released after use, by calling the [release] method. static RequestBody create1( - jni.JObject byteString, + ByteString byteString, jni.JObject mediaType, ) { return _create1(_class.reference.pointer, _id_create1 as jni.JMethodIDPtr, @@ -1693,8 +1700,8 @@ class RequestBody extends jni.JObject { } static final _id_create2 = _class.staticMethodId( - r"create", - r"([BLokhttp3/MediaType;II)Lokhttp3/RequestBody;", + r'create', + r'([BLokhttp3/MediaType;II)Lokhttp3/RequestBody;', ); static final _create2 = ProtectedJniExtensions.lookup< @@ -1706,9 +1713,9 @@ class RequestBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Int32 - )>)>>("globalEnv_CallStaticObjectMethod") + $Int32, + $Int32 + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer, int, int)>(); @@ -1727,8 +1734,8 @@ class RequestBody extends jni.JObject { } static final _id_create3 = _class.staticMethodId( - r"create", - r"(Ljava/io/File;Lokhttp3/MediaType;)Lokhttp3/RequestBody;", + r'create', + r'(Ljava/io/File;Lokhttp3/MediaType;)Lokhttp3/RequestBody;', ); static final _create3 = ProtectedJniExtensions.lookup< @@ -1740,7 +1747,7 @@ class RequestBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -1757,8 +1764,8 @@ class RequestBody extends jni.JObject { } static final _id_create4 = _class.staticMethodId( - r"create", - r"(Lokhttp3/MediaType;Ljava/lang/String;)Lokhttp3/RequestBody;", + r'create', + r'(Lokhttp3/MediaType;Ljava/lang/String;)Lokhttp3/RequestBody;', ); static final _create4 = ProtectedJniExtensions.lookup< @@ -1770,7 +1777,7 @@ class RequestBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -1787,8 +1794,8 @@ class RequestBody extends jni.JObject { } static final _id_create5 = _class.staticMethodId( - r"create", - r"(Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/RequestBody;", + r'create', + r'(Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/RequestBody;', ); static final _create5 = ProtectedJniExtensions.lookup< @@ -1800,7 +1807,7 @@ class RequestBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -1809,7 +1816,7 @@ class RequestBody extends jni.JObject { /// The returned object must be released after use, by calling the [release] method. static RequestBody create5( jni.JObject mediaType, - jni.JObject byteString, + ByteString byteString, ) { return _create5(_class.reference.pointer, _id_create5 as jni.JMethodIDPtr, mediaType.reference.pointer, byteString.reference.pointer) @@ -1817,8 +1824,8 @@ class RequestBody extends jni.JObject { } static final _id_create6 = _class.staticMethodId( - r"create", - r"(Lokhttp3/MediaType;[BII)Lokhttp3/RequestBody;", + r'create', + r'(Lokhttp3/MediaType;[BII)Lokhttp3/RequestBody;', ); static final _create6 = ProtectedJniExtensions.lookup< @@ -1830,9 +1837,9 @@ class RequestBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Int32 - )>)>>("globalEnv_CallStaticObjectMethod") + $Int32, + $Int32 + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer, int, int)>(); @@ -1851,8 +1858,8 @@ class RequestBody extends jni.JObject { } static final _id_create7 = _class.staticMethodId( - r"create", - r"(Lokhttp3/MediaType;Ljava/io/File;)Lokhttp3/RequestBody;", + r'create', + r'(Lokhttp3/MediaType;Ljava/io/File;)Lokhttp3/RequestBody;', ); static final _create7 = ProtectedJniExtensions.lookup< @@ -1864,7 +1871,7 @@ class RequestBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -1881,8 +1888,8 @@ class RequestBody extends jni.JObject { } static final _id_create8 = _class.staticMethodId( - r"create", - r"([BLokhttp3/MediaType;I)Lokhttp3/RequestBody;", + r'create', + r'([BLokhttp3/MediaType;I)Lokhttp3/RequestBody;', ); static final _create8 = ProtectedJniExtensions.lookup< @@ -1894,8 +1901,8 @@ class RequestBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer, - ffi.Int32 - )>)>>("globalEnv_CallStaticObjectMethod") + $Int32 + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer, int)>(); @@ -1913,8 +1920,8 @@ class RequestBody extends jni.JObject { } static final _id_create9 = _class.staticMethodId( - r"create", - r"([BLokhttp3/MediaType;)Lokhttp3/RequestBody;", + r'create', + r'([BLokhttp3/MediaType;)Lokhttp3/RequestBody;', ); static final _create9 = ProtectedJniExtensions.lookup< @@ -1926,7 +1933,7 @@ class RequestBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -1943,8 +1950,8 @@ class RequestBody extends jni.JObject { } static final _id_create10 = _class.staticMethodId( - r"create", - r"([B)Lokhttp3/RequestBody;", + r'create', + r'([B)Lokhttp3/RequestBody;', ); static final _create10 = ProtectedJniExtensions.lookup< @@ -1953,7 +1960,7 @@ class RequestBody extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallStaticObjectMethod") + 'globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -1969,8 +1976,8 @@ class RequestBody extends jni.JObject { } static final _id_create11 = _class.staticMethodId( - r"create", - r"(Lokhttp3/MediaType;[BI)Lokhttp3/RequestBody;", + r'create', + r'(Lokhttp3/MediaType;[BI)Lokhttp3/RequestBody;', ); static final _create11 = ProtectedJniExtensions.lookup< @@ -1982,8 +1989,8 @@ class RequestBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer, - ffi.Int32 - )>)>>("globalEnv_CallStaticObjectMethod") + $Int32 + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer, int)>(); @@ -2001,8 +2008,8 @@ class RequestBody extends jni.JObject { } static final _id_create12 = _class.staticMethodId( - r"create", - r"(Lokhttp3/MediaType;[B)Lokhttp3/RequestBody;", + r'create', + r'(Lokhttp3/MediaType;[B)Lokhttp3/RequestBody;', ); static final _create12 = ProtectedJniExtensions.lookup< @@ -2014,7 +2021,7 @@ class RequestBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -2035,7 +2042,7 @@ final class $RequestBodyType extends jni.JObjType { const $RequestBodyType(); @override - String get signature => r"Lokhttp3/RequestBody;"; + String get signature => r'Lokhttp3/RequestBody;'; @override RequestBody fromReference(jni.JReference reference) => @@ -2065,12 +2072,12 @@ class Response_Builder extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/Response$Builder"); + static final _class = jni.JClass.forName(r'okhttp3/Response$Builder'); /// The type which includes information such as the signature of this class. static const type = $Response_BuilderType(); static final _id_new0 = _class.constructorId( - r"()V", + r'()V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -2078,7 +2085,7 @@ class Response_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_NewObject") + )>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2094,7 +2101,7 @@ class Response_Builder extends jni.JObject { } static final _id_new1 = _class.constructorId( - r"(Lokhttp3/Response;)V", + r'(Lokhttp3/Response;)V', ); static final _new1 = ProtectedJniExtensions.lookup< @@ -2103,7 +2110,7 @@ class Response_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") + 'globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -2119,8 +2126,8 @@ class Response_Builder extends jni.JObject { } static final _id_request = _class.instanceMethodId( - r"request", - r"(Lokhttp3/Request;)Lokhttp3/Response$Builder;", + r'request', + r'(Lokhttp3/Request;)Lokhttp3/Response$Builder;', ); static final _request = ProtectedJniExtensions.lookup< @@ -2129,7 +2136,7 @@ class Response_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -2145,8 +2152,8 @@ class Response_Builder extends jni.JObject { } static final _id_protocol = _class.instanceMethodId( - r"protocol", - r"(Lokhttp3/Protocol;)Lokhttp3/Response$Builder;", + r'protocol', + r'(Lokhttp3/Protocol;)Lokhttp3/Response$Builder;', ); static final _protocol = ProtectedJniExtensions.lookup< @@ -2155,7 +2162,7 @@ class Response_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -2171,14 +2178,14 @@ class Response_Builder extends jni.JObject { } static final _id_code = _class.instanceMethodId( - r"code", - r"(I)Lokhttp3/Response$Builder;", + r'code', + r'(I)Lokhttp3/Response$Builder;', ); static final _code = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int32,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<($Int32,)>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -2193,8 +2200,8 @@ class Response_Builder extends jni.JObject { } static final _id_message = _class.instanceMethodId( - r"message", - r"(Ljava/lang/String;)Lokhttp3/Response$Builder;", + r'message', + r'(Ljava/lang/String;)Lokhttp3/Response$Builder;', ); static final _message = ProtectedJniExtensions.lookup< @@ -2203,7 +2210,7 @@ class Response_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -2219,8 +2226,8 @@ class Response_Builder extends jni.JObject { } static final _id_handshake = _class.instanceMethodId( - r"handshake", - r"(Lokhttp3/Handshake;)Lokhttp3/Response$Builder;", + r'handshake', + r'(Lokhttp3/Handshake;)Lokhttp3/Response$Builder;', ); static final _handshake = ProtectedJniExtensions.lookup< @@ -2229,7 +2236,7 @@ class Response_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -2245,8 +2252,8 @@ class Response_Builder extends jni.JObject { } static final _id_header = _class.instanceMethodId( - r"header", - r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Response$Builder;", + r'header', + r'(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Response$Builder;', ); static final _header = ProtectedJniExtensions.lookup< @@ -2258,7 +2265,7 @@ class Response_Builder extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -2275,8 +2282,8 @@ class Response_Builder extends jni.JObject { } static final _id_addHeader = _class.instanceMethodId( - r"addHeader", - r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Response$Builder;", + r'addHeader', + r'(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Response$Builder;', ); static final _addHeader = ProtectedJniExtensions.lookup< @@ -2288,7 +2295,7 @@ class Response_Builder extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -2305,8 +2312,8 @@ class Response_Builder extends jni.JObject { } static final _id_removeHeader = _class.instanceMethodId( - r"removeHeader", - r"(Ljava/lang/String;)Lokhttp3/Response$Builder;", + r'removeHeader', + r'(Ljava/lang/String;)Lokhttp3/Response$Builder;', ); static final _removeHeader = ProtectedJniExtensions.lookup< @@ -2315,7 +2322,7 @@ class Response_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -2331,8 +2338,8 @@ class Response_Builder extends jni.JObject { } static final _id_headers = _class.instanceMethodId( - r"headers", - r"(Lokhttp3/Headers;)Lokhttp3/Response$Builder;", + r'headers', + r'(Lokhttp3/Headers;)Lokhttp3/Response$Builder;', ); static final _headers = ProtectedJniExtensions.lookup< @@ -2341,7 +2348,7 @@ class Response_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -2357,8 +2364,8 @@ class Response_Builder extends jni.JObject { } static final _id_body = _class.instanceMethodId( - r"body", - r"(Lokhttp3/ResponseBody;)Lokhttp3/Response$Builder;", + r'body', + r'(Lokhttp3/ResponseBody;)Lokhttp3/Response$Builder;', ); static final _body = ProtectedJniExtensions.lookup< @@ -2367,7 +2374,7 @@ class Response_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -2383,8 +2390,8 @@ class Response_Builder extends jni.JObject { } static final _id_networkResponse = _class.instanceMethodId( - r"networkResponse", - r"(Lokhttp3/Response;)Lokhttp3/Response$Builder;", + r'networkResponse', + r'(Lokhttp3/Response;)Lokhttp3/Response$Builder;', ); static final _networkResponse = ProtectedJniExtensions.lookup< @@ -2393,7 +2400,7 @@ class Response_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -2409,8 +2416,8 @@ class Response_Builder extends jni.JObject { } static final _id_cacheResponse = _class.instanceMethodId( - r"cacheResponse", - r"(Lokhttp3/Response;)Lokhttp3/Response$Builder;", + r'cacheResponse', + r'(Lokhttp3/Response;)Lokhttp3/Response$Builder;', ); static final _cacheResponse = ProtectedJniExtensions.lookup< @@ -2419,7 +2426,7 @@ class Response_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -2435,8 +2442,8 @@ class Response_Builder extends jni.JObject { } static final _id_priorResponse = _class.instanceMethodId( - r"priorResponse", - r"(Lokhttp3/Response;)Lokhttp3/Response$Builder;", + r'priorResponse', + r'(Lokhttp3/Response;)Lokhttp3/Response$Builder;', ); static final _priorResponse = ProtectedJniExtensions.lookup< @@ -2445,7 +2452,7 @@ class Response_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -2461,14 +2468,14 @@ class Response_Builder extends jni.JObject { } static final _id_sentRequestAtMillis = _class.instanceMethodId( - r"sentRequestAtMillis", - r"(J)Lokhttp3/Response$Builder;", + r'sentRequestAtMillis', + r'(J)Lokhttp3/Response$Builder;', ); static final _sentRequestAtMillis = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<(ffi.Int64,)>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -2484,14 +2491,14 @@ class Response_Builder extends jni.JObject { } static final _id_receivedResponseAtMillis = _class.instanceMethodId( - r"receivedResponseAtMillis", - r"(J)Lokhttp3/Response$Builder;", + r'receivedResponseAtMillis', + r'(J)Lokhttp3/Response$Builder;', ); static final _receivedResponseAtMillis = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<(ffi.Int64,)>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -2507,8 +2514,8 @@ class Response_Builder extends jni.JObject { } static final _id_build = _class.instanceMethodId( - r"build", - r"()Lokhttp3/Response;", + r'build', + r'()Lokhttp3/Response;', ); static final _build = ProtectedJniExtensions.lookup< @@ -2516,7 +2523,7 @@ class Response_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2535,7 +2542,7 @@ final class $Response_BuilderType extends jni.JObjType { const $Response_BuilderType(); @override - String get signature => r"Lokhttp3/Response$Builder;"; + String get signature => r'Lokhttp3/Response$Builder;'; @override Response_Builder fromReference(jni.JReference reference) => @@ -2566,12 +2573,12 @@ class Response extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/Response"); + static final _class = jni.JClass.forName(r'okhttp3/Response'); /// The type which includes information such as the signature of this class. static const type = $ResponseType(); static final _id_new0 = _class.constructorId( - r"(Lokhttp3/Request;Lokhttp3/Protocol;Ljava/lang/String;ILokhttp3/Handshake;Lokhttp3/Headers;Lokhttp3/ResponseBody;Lokhttp3/Response;Lokhttp3/Response;Lokhttp3/Response;JJLokhttp3/internal/connection/Exchange;)V", + r'(Lokhttp3/Request;Lokhttp3/Protocol;Ljava/lang/String;ILokhttp3/Handshake;Lokhttp3/Headers;Lokhttp3/ResponseBody;Lokhttp3/Response;Lokhttp3/Response;Lokhttp3/Response;JJLokhttp3/internal/connection/Exchange;)V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -2584,7 +2591,7 @@ class Response extends jni.JObject { ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Int32, + $Int32, ffi.Pointer, ffi.Pointer, ffi.Pointer, @@ -2594,7 +2601,7 @@ class Response extends jni.JObject { ffi.Int64, ffi.Int64, ffi.Pointer - )>)>>("globalEnv_NewObject") + )>)>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2650,8 +2657,8 @@ class Response extends jni.JObject { } static final _id_request = _class.instanceMethodId( - r"request", - r"()Lokhttp3/Request;", + r'request', + r'()Lokhttp3/Request;', ); static final _request = ProtectedJniExtensions.lookup< @@ -2659,7 +2666,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2674,8 +2681,8 @@ class Response extends jni.JObject { } static final _id_protocol = _class.instanceMethodId( - r"protocol", - r"()Lokhttp3/Protocol;", + r'protocol', + r'()Lokhttp3/Protocol;', ); static final _protocol = ProtectedJniExtensions.lookup< @@ -2683,7 +2690,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2698,8 +2705,8 @@ class Response extends jni.JObject { } static final _id_message = _class.instanceMethodId( - r"message", - r"()Ljava/lang/String;", + r'message', + r'()Ljava/lang/String;', ); static final _message = ProtectedJniExtensions.lookup< @@ -2707,7 +2714,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2722,8 +2729,8 @@ class Response extends jni.JObject { } static final _id_code = _class.instanceMethodId( - r"code", - r"()I", + r'code', + r'()I', ); static final _code = ProtectedJniExtensions.lookup< @@ -2731,7 +2738,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2744,8 +2751,8 @@ class Response extends jni.JObject { } static final _id_handshake = _class.instanceMethodId( - r"handshake", - r"()Lokhttp3/Handshake;", + r'handshake', + r'()Lokhttp3/Handshake;', ); static final _handshake = ProtectedJniExtensions.lookup< @@ -2753,7 +2760,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2768,8 +2775,8 @@ class Response extends jni.JObject { } static final _id_headers = _class.instanceMethodId( - r"headers", - r"()Lokhttp3/Headers;", + r'headers', + r'()Lokhttp3/Headers;', ); static final _headers = ProtectedJniExtensions.lookup< @@ -2777,7 +2784,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2792,8 +2799,8 @@ class Response extends jni.JObject { } static final _id_body = _class.instanceMethodId( - r"body", - r"()Lokhttp3/ResponseBody;", + r'body', + r'()Lokhttp3/ResponseBody;', ); static final _body = ProtectedJniExtensions.lookup< @@ -2801,7 +2808,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2816,8 +2823,8 @@ class Response extends jni.JObject { } static final _id_networkResponse = _class.instanceMethodId( - r"networkResponse", - r"()Lokhttp3/Response;", + r'networkResponse', + r'()Lokhttp3/Response;', ); static final _networkResponse = ProtectedJniExtensions.lookup< @@ -2825,7 +2832,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2841,8 +2848,8 @@ class Response extends jni.JObject { } static final _id_cacheResponse = _class.instanceMethodId( - r"cacheResponse", - r"()Lokhttp3/Response;", + r'cacheResponse', + r'()Lokhttp3/Response;', ); static final _cacheResponse = ProtectedJniExtensions.lookup< @@ -2850,7 +2857,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2866,8 +2873,8 @@ class Response extends jni.JObject { } static final _id_priorResponse = _class.instanceMethodId( - r"priorResponse", - r"()Lokhttp3/Response;", + r'priorResponse', + r'()Lokhttp3/Response;', ); static final _priorResponse = ProtectedJniExtensions.lookup< @@ -2875,7 +2882,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2891,8 +2898,8 @@ class Response extends jni.JObject { } static final _id_sentRequestAtMillis = _class.instanceMethodId( - r"sentRequestAtMillis", - r"()J", + r'sentRequestAtMillis', + r'()J', ); static final _sentRequestAtMillis = ProtectedJniExtensions.lookup< @@ -2900,7 +2907,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallLongMethod") + )>>('globalEnv_CallLongMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2915,8 +2922,8 @@ class Response extends jni.JObject { } static final _id_receivedResponseAtMillis = _class.instanceMethodId( - r"receivedResponseAtMillis", - r"()J", + r'receivedResponseAtMillis', + r'()J', ); static final _receivedResponseAtMillis = ProtectedJniExtensions.lookup< @@ -2924,7 +2931,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallLongMethod") + )>>('globalEnv_CallLongMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2939,8 +2946,8 @@ class Response extends jni.JObject { } static final _id_exchange = _class.instanceMethodId( - r"exchange", - r"()Lokhttp3/internal/connection/Exchange;", + r'exchange', + r'()Lokhttp3/internal/connection/Exchange;', ); static final _exchange = ProtectedJniExtensions.lookup< @@ -2948,7 +2955,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2963,8 +2970,8 @@ class Response extends jni.JObject { } static final _id_isSuccessful = _class.instanceMethodId( - r"isSuccessful", - r"()Z", + r'isSuccessful', + r'()Z', ); static final _isSuccessful = ProtectedJniExtensions.lookup< @@ -2972,7 +2979,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallBooleanMethod") + )>>('globalEnv_CallBooleanMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2987,8 +2994,8 @@ class Response extends jni.JObject { } static final _id_headers1 = _class.instanceMethodId( - r"headers", - r"(Ljava/lang/String;)Ljava/util/List;", + r'headers', + r'(Ljava/lang/String;)Ljava/util/List;', ); static final _headers1 = ProtectedJniExtensions.lookup< @@ -2997,7 +3004,7 @@ class Response extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -3013,8 +3020,8 @@ class Response extends jni.JObject { } static final _id_header = _class.instanceMethodId( - r"header", - r"(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", + r'header', + r'(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;', ); static final _header = ProtectedJniExtensions.lookup< @@ -3026,7 +3033,7 @@ class Response extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -3043,8 +3050,8 @@ class Response extends jni.JObject { } static final _id_trailers = _class.instanceMethodId( - r"trailers", - r"()Lokhttp3/Headers;", + r'trailers', + r'()Lokhttp3/Headers;', ); static final _trailers = ProtectedJniExtensions.lookup< @@ -3052,7 +3059,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3067,14 +3074,14 @@ class Response extends jni.JObject { } static final _id_peekBody = _class.instanceMethodId( - r"peekBody", - r"(J)Lokhttp3/ResponseBody;", + r'peekBody', + r'(J)Lokhttp3/ResponseBody;', ); static final _peekBody = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<(ffi.Int64,)>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -3089,8 +3096,8 @@ class Response extends jni.JObject { } static final _id_newBuilder = _class.instanceMethodId( - r"newBuilder", - r"()Lokhttp3/Response$Builder;", + r'newBuilder', + r'()Lokhttp3/Response$Builder;', ); static final _newBuilder = ProtectedJniExtensions.lookup< @@ -3098,7 +3105,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3113,8 +3120,8 @@ class Response extends jni.JObject { } static final _id_isRedirect = _class.instanceMethodId( - r"isRedirect", - r"()Z", + r'isRedirect', + r'()Z', ); static final _isRedirect = ProtectedJniExtensions.lookup< @@ -3122,7 +3129,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallBooleanMethod") + )>>('globalEnv_CallBooleanMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3136,8 +3143,8 @@ class Response extends jni.JObject { } static final _id_challenges = _class.instanceMethodId( - r"challenges", - r"()Ljava/util/List;", + r'challenges', + r'()Ljava/util/List;', ); static final _challenges = ProtectedJniExtensions.lookup< @@ -3145,7 +3152,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3160,8 +3167,8 @@ class Response extends jni.JObject { } static final _id_cacheControl = _class.instanceMethodId( - r"cacheControl", - r"()Lokhttp3/CacheControl;", + r'cacheControl', + r'()Lokhttp3/CacheControl;', ); static final _cacheControl = ProtectedJniExtensions.lookup< @@ -3169,7 +3176,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3185,8 +3192,8 @@ class Response extends jni.JObject { } static final _id_close = _class.instanceMethodId( - r"close", - r"()V", + r'close', + r'()V', ); static final _close = ProtectedJniExtensions.lookup< @@ -3194,7 +3201,7 @@ class Response extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") + )>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -3207,8 +3214,8 @@ class Response extends jni.JObject { } static final _id_toString1 = _class.instanceMethodId( - r"toString", - r"()Ljava/lang/String;", + r'toString', + r'()Ljava/lang/String;', ); static final _toString1 = ProtectedJniExtensions.lookup< @@ -3216,7 +3223,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3231,8 +3238,8 @@ class Response extends jni.JObject { } static final _id_header1 = _class.instanceMethodId( - r"header", - r"(Ljava/lang/String;)Ljava/lang/String;", + r'header', + r'(Ljava/lang/String;)Ljava/lang/String;', ); static final _header1 = ProtectedJniExtensions.lookup< @@ -3241,7 +3248,7 @@ class Response extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -3261,7 +3268,7 @@ final class $ResponseType extends jni.JObjType { const $ResponseType(); @override - String get signature => r"Lokhttp3/Response;"; + String get signature => r'Lokhttp3/Response;'; @override Response fromReference(jni.JReference reference) => @@ -3292,12 +3299,12 @@ class ResponseBody_BomAwareReader extends jni.JObject { ) : super.fromReference(reference); static final _class = - jni.JClass.forName(r"okhttp3/ResponseBody$BomAwareReader"); + jni.JClass.forName(r'okhttp3/ResponseBody$BomAwareReader'); /// The type which includes information such as the signature of this class. static const type = $ResponseBody_BomAwareReaderType(); static final _id_new0 = _class.constructorId( - r"(Lokio/BufferedSource;Ljava/nio/charset/Charset;)V", + r'(Lokio/BufferedSource;Ljava/nio/charset/Charset;)V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -3309,7 +3316,7 @@ class ResponseBody_BomAwareReader extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_NewObject") + )>)>>('globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -3329,21 +3336,17 @@ class ResponseBody_BomAwareReader extends jni.JObject { } static final _id_read = _class.instanceMethodId( - r"read", - r"([CII)I", + r'read', + r'([CII)I', ); static final _read = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Int32, - ffi.Int32 - )>)>>("globalEnv_CallIntMethod") + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer, $Int32, $Int32)>)>>( + 'globalEnv_CallIntMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, int, int)>(); @@ -3360,8 +3363,8 @@ class ResponseBody_BomAwareReader extends jni.JObject { } static final _id_close = _class.instanceMethodId( - r"close", - r"()V", + r'close', + r'()V', ); static final _close = ProtectedJniExtensions.lookup< @@ -3369,7 +3372,7 @@ class ResponseBody_BomAwareReader extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") + )>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -3387,7 +3390,7 @@ final class $ResponseBody_BomAwareReaderType const $ResponseBody_BomAwareReaderType(); @override - String get signature => r"Lokhttp3/ResponseBody$BomAwareReader;"; + String get signature => r'Lokhttp3/ResponseBody$BomAwareReader;'; @override ResponseBody_BomAwareReader fromReference(jni.JReference reference) => @@ -3418,13 +3421,13 @@ class ResponseBody_Companion extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/ResponseBody$Companion"); + static final _class = jni.JClass.forName(r'okhttp3/ResponseBody$Companion'); /// The type which includes information such as the signature of this class. static const type = $ResponseBody_CompanionType(); static final _id_create = _class.instanceMethodId( - r"create", - r"(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/ResponseBody;", + r'create', + r'(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/ResponseBody;', ); static final _create = ProtectedJniExtensions.lookup< @@ -3436,7 +3439,7 @@ class ResponseBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -3453,8 +3456,8 @@ class ResponseBody_Companion extends jni.JObject { } static final _id_create1 = _class.instanceMethodId( - r"create", - r"([BLokhttp3/MediaType;)Lokhttp3/ResponseBody;", + r'create', + r'([BLokhttp3/MediaType;)Lokhttp3/ResponseBody;', ); static final _create1 = ProtectedJniExtensions.lookup< @@ -3466,7 +3469,7 @@ class ResponseBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -3483,8 +3486,8 @@ class ResponseBody_Companion extends jni.JObject { } static final _id_create2 = _class.instanceMethodId( - r"create", - r"(Lokio/ByteString;Lokhttp3/MediaType;)Lokhttp3/ResponseBody;", + r'create', + r'(Lokio/ByteString;Lokhttp3/MediaType;)Lokhttp3/ResponseBody;', ); static final _create2 = ProtectedJniExtensions.lookup< @@ -3496,7 +3499,7 @@ class ResponseBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -3504,7 +3507,7 @@ class ResponseBody_Companion extends jni.JObject { /// from: public final okhttp3.ResponseBody create(okio.ByteString byteString, okhttp3.MediaType mediaType) /// The returned object must be released after use, by calling the [release] method. ResponseBody create2( - jni.JObject byteString, + ByteString byteString, jni.JObject mediaType, ) { return _create2(reference.pointer, _id_create2 as jni.JMethodIDPtr, @@ -3513,8 +3516,8 @@ class ResponseBody_Companion extends jni.JObject { } static final _id_create3 = _class.instanceMethodId( - r"create", - r"(Lokio/BufferedSource;Lokhttp3/MediaType;J)Lokhttp3/ResponseBody;", + r'create', + r'(Lokio/BufferedSource;Lokhttp3/MediaType;J)Lokhttp3/ResponseBody;', ); static final _create3 = ProtectedJniExtensions.lookup< @@ -3527,7 +3530,7 @@ class ResponseBody_Companion extends jni.JObject { ffi.Pointer, ffi.Pointer, ffi.Int64 - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer, int)>(); @@ -3545,8 +3548,8 @@ class ResponseBody_Companion extends jni.JObject { } static final _id_create4 = _class.instanceMethodId( - r"create", - r"(Lokhttp3/MediaType;Ljava/lang/String;)Lokhttp3/ResponseBody;", + r'create', + r'(Lokhttp3/MediaType;Ljava/lang/String;)Lokhttp3/ResponseBody;', ); static final _create4 = ProtectedJniExtensions.lookup< @@ -3558,7 +3561,7 @@ class ResponseBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -3575,8 +3578,8 @@ class ResponseBody_Companion extends jni.JObject { } static final _id_create5 = _class.instanceMethodId( - r"create", - r"(Lokhttp3/MediaType;[B)Lokhttp3/ResponseBody;", + r'create', + r'(Lokhttp3/MediaType;[B)Lokhttp3/ResponseBody;', ); static final _create5 = ProtectedJniExtensions.lookup< @@ -3588,7 +3591,7 @@ class ResponseBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -3605,8 +3608,8 @@ class ResponseBody_Companion extends jni.JObject { } static final _id_create6 = _class.instanceMethodId( - r"create", - r"(Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/ResponseBody;", + r'create', + r'(Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/ResponseBody;', ); static final _create6 = ProtectedJniExtensions.lookup< @@ -3618,7 +3621,7 @@ class ResponseBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -3627,7 +3630,7 @@ class ResponseBody_Companion extends jni.JObject { /// The returned object must be released after use, by calling the [release] method. ResponseBody create6( jni.JObject mediaType, - jni.JObject byteString, + ByteString byteString, ) { return _create6(reference.pointer, _id_create6 as jni.JMethodIDPtr, mediaType.reference.pointer, byteString.reference.pointer) @@ -3635,8 +3638,8 @@ class ResponseBody_Companion extends jni.JObject { } static final _id_create7 = _class.instanceMethodId( - r"create", - r"(Lokhttp3/MediaType;JLokio/BufferedSource;)Lokhttp3/ResponseBody;", + r'create', + r'(Lokhttp3/MediaType;JLokio/BufferedSource;)Lokhttp3/ResponseBody;', ); static final _create7 = ProtectedJniExtensions.lookup< @@ -3649,7 +3652,7 @@ class ResponseBody_Companion extends jni.JObject { ffi.Pointer, ffi.Int64, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, int, ffi.Pointer)>(); @@ -3667,7 +3670,7 @@ class ResponseBody_Companion extends jni.JObject { } static final _id_new0 = _class.constructorId( - r"(Lkotlin/jvm/internal/DefaultConstructorMarker;)V", + r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -3676,7 +3679,7 @@ class ResponseBody_Companion extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") + 'globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -3699,7 +3702,7 @@ final class $ResponseBody_CompanionType const $ResponseBody_CompanionType(); @override - String get signature => r"Lokhttp3/ResponseBody$Companion;"; + String get signature => r'Lokhttp3/ResponseBody$Companion;'; @override ResponseBody_Companion fromReference(jni.JReference reference) => @@ -3730,13 +3733,13 @@ class ResponseBody extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/ResponseBody"); + static final _class = jni.JClass.forName(r'okhttp3/ResponseBody'); /// The type which includes information such as the signature of this class. static const type = $ResponseBodyType(); static final _id_Companion = _class.staticFieldId( - r"Companion", - r"Lokhttp3/ResponseBody$Companion;", + r'Companion', + r'Lokhttp3/ResponseBody$Companion;', ); /// from: static public final okhttp3.ResponseBody$Companion Companion @@ -3745,7 +3748,7 @@ class ResponseBody extends jni.JObject { _id_Companion.get(_class, const $ResponseBody_CompanionType()); static final _id_new0 = _class.constructorId( - r"()V", + r'()V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -3753,7 +3756,7 @@ class ResponseBody extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_NewObject") + )>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3769,8 +3772,8 @@ class ResponseBody extends jni.JObject { } static final _id_contentType = _class.instanceMethodId( - r"contentType", - r"()Lokhttp3/MediaType;", + r'contentType', + r'()Lokhttp3/MediaType;', ); static final _contentType = ProtectedJniExtensions.lookup< @@ -3778,7 +3781,7 @@ class ResponseBody extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3793,8 +3796,8 @@ class ResponseBody extends jni.JObject { } static final _id_contentLength = _class.instanceMethodId( - r"contentLength", - r"()J", + r'contentLength', + r'()J', ); static final _contentLength = ProtectedJniExtensions.lookup< @@ -3802,7 +3805,7 @@ class ResponseBody extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallLongMethod") + )>>('globalEnv_CallLongMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3817,8 +3820,8 @@ class ResponseBody extends jni.JObject { } static final _id_byteStream = _class.instanceMethodId( - r"byteStream", - r"()Ljava/io/InputStream;", + r'byteStream', + r'()Ljava/io/InputStream;', ); static final _byteStream = ProtectedJniExtensions.lookup< @@ -3826,7 +3829,7 @@ class ResponseBody extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3841,8 +3844,8 @@ class ResponseBody extends jni.JObject { } static final _id_source = _class.instanceMethodId( - r"source", - r"()Lokio/BufferedSource;", + r'source', + r'()Lokio/BufferedSource;', ); static final _source = ProtectedJniExtensions.lookup< @@ -3850,7 +3853,7 @@ class ResponseBody extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3865,8 +3868,8 @@ class ResponseBody extends jni.JObject { } static final _id_bytes = _class.instanceMethodId( - r"bytes", - r"()[B", + r'bytes', + r'()[B', ); static final _bytes = ProtectedJniExtensions.lookup< @@ -3874,7 +3877,7 @@ class ResponseBody extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3889,8 +3892,8 @@ class ResponseBody extends jni.JObject { } static final _id_byteString = _class.instanceMethodId( - r"byteString", - r"()Lokio/ByteString;", + r'byteString', + r'()Lokio/ByteString;', ); static final _byteString = ProtectedJniExtensions.lookup< @@ -3898,7 +3901,7 @@ class ResponseBody extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3907,14 +3910,14 @@ class ResponseBody extends jni.JObject { /// from: public final okio.ByteString byteString() /// The returned object must be released after use, by calling the [release] method. - jni.JObject byteString() { + ByteString byteString() { return _byteString(reference.pointer, _id_byteString as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + .object(const $ByteStringType()); } static final _id_charStream = _class.instanceMethodId( - r"charStream", - r"()Ljava/io/Reader;", + r'charStream', + r'()Ljava/io/Reader;', ); static final _charStream = ProtectedJniExtensions.lookup< @@ -3922,7 +3925,7 @@ class ResponseBody extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3937,8 +3940,8 @@ class ResponseBody extends jni.JObject { } static final _id_string = _class.instanceMethodId( - r"string", - r"()Ljava/lang/String;", + r'string', + r'()Ljava/lang/String;', ); static final _string = ProtectedJniExtensions.lookup< @@ -3946,7 +3949,7 @@ class ResponseBody extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3961,8 +3964,8 @@ class ResponseBody extends jni.JObject { } static final _id_close = _class.instanceMethodId( - r"close", - r"()V", + r'close', + r'()V', ); static final _close = ProtectedJniExtensions.lookup< @@ -3970,7 +3973,7 @@ class ResponseBody extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") + )>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -3983,8 +3986,8 @@ class ResponseBody extends jni.JObject { } static final _id_create = _class.staticMethodId( - r"create", - r"(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/ResponseBody;", + r'create', + r'(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/ResponseBody;', ); static final _create = ProtectedJniExtensions.lookup< @@ -3996,7 +3999,7 @@ class ResponseBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -4013,8 +4016,8 @@ class ResponseBody extends jni.JObject { } static final _id_create1 = _class.staticMethodId( - r"create", - r"([BLokhttp3/MediaType;)Lokhttp3/ResponseBody;", + r'create', + r'([BLokhttp3/MediaType;)Lokhttp3/ResponseBody;', ); static final _create1 = ProtectedJniExtensions.lookup< @@ -4026,7 +4029,7 @@ class ResponseBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -4043,8 +4046,8 @@ class ResponseBody extends jni.JObject { } static final _id_create2 = _class.staticMethodId( - r"create", - r"(Lokio/ByteString;Lokhttp3/MediaType;)Lokhttp3/ResponseBody;", + r'create', + r'(Lokio/ByteString;Lokhttp3/MediaType;)Lokhttp3/ResponseBody;', ); static final _create2 = ProtectedJniExtensions.lookup< @@ -4056,7 +4059,7 @@ class ResponseBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -4064,7 +4067,7 @@ class ResponseBody extends jni.JObject { /// from: static public final okhttp3.ResponseBody create(okio.ByteString byteString, okhttp3.MediaType mediaType) /// The returned object must be released after use, by calling the [release] method. static ResponseBody create2( - jni.JObject byteString, + ByteString byteString, jni.JObject mediaType, ) { return _create2(_class.reference.pointer, _id_create2 as jni.JMethodIDPtr, @@ -4073,8 +4076,8 @@ class ResponseBody extends jni.JObject { } static final _id_create3 = _class.staticMethodId( - r"create", - r"(Lokio/BufferedSource;Lokhttp3/MediaType;J)Lokhttp3/ResponseBody;", + r'create', + r'(Lokio/BufferedSource;Lokhttp3/MediaType;J)Lokhttp3/ResponseBody;', ); static final _create3 = ProtectedJniExtensions.lookup< @@ -4087,7 +4090,7 @@ class ResponseBody extends jni.JObject { ffi.Pointer, ffi.Pointer, ffi.Int64 - )>)>>("globalEnv_CallStaticObjectMethod") + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer, int)>(); @@ -4105,8 +4108,8 @@ class ResponseBody extends jni.JObject { } static final _id_create4 = _class.staticMethodId( - r"create", - r"(Lokhttp3/MediaType;Ljava/lang/String;)Lokhttp3/ResponseBody;", + r'create', + r'(Lokhttp3/MediaType;Ljava/lang/String;)Lokhttp3/ResponseBody;', ); static final _create4 = ProtectedJniExtensions.lookup< @@ -4118,7 +4121,7 @@ class ResponseBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -4135,8 +4138,8 @@ class ResponseBody extends jni.JObject { } static final _id_create5 = _class.staticMethodId( - r"create", - r"(Lokhttp3/MediaType;[B)Lokhttp3/ResponseBody;", + r'create', + r'(Lokhttp3/MediaType;[B)Lokhttp3/ResponseBody;', ); static final _create5 = ProtectedJniExtensions.lookup< @@ -4148,7 +4151,7 @@ class ResponseBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -4165,8 +4168,8 @@ class ResponseBody extends jni.JObject { } static final _id_create6 = _class.staticMethodId( - r"create", - r"(Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/ResponseBody;", + r'create', + r'(Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/ResponseBody;', ); static final _create6 = ProtectedJniExtensions.lookup< @@ -4178,7 +4181,7 @@ class ResponseBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -4187,7 +4190,7 @@ class ResponseBody extends jni.JObject { /// The returned object must be released after use, by calling the [release] method. static ResponseBody create6( jni.JObject mediaType, - jni.JObject byteString, + ByteString byteString, ) { return _create6(_class.reference.pointer, _id_create6 as jni.JMethodIDPtr, mediaType.reference.pointer, byteString.reference.pointer) @@ -4195,8 +4198,8 @@ class ResponseBody extends jni.JObject { } static final _id_create7 = _class.staticMethodId( - r"create", - r"(Lokhttp3/MediaType;JLokio/BufferedSource;)Lokhttp3/ResponseBody;", + r'create', + r'(Lokhttp3/MediaType;JLokio/BufferedSource;)Lokhttp3/ResponseBody;', ); static final _create7 = ProtectedJniExtensions.lookup< @@ -4209,7 +4212,7 @@ class ResponseBody extends jni.JObject { ffi.Pointer, ffi.Int64, ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, int, ffi.Pointer)>(); @@ -4231,7 +4234,7 @@ final class $ResponseBodyType extends jni.JObjType { const $ResponseBodyType(); @override - String get signature => r"Lokhttp3/ResponseBody;"; + String get signature => r'Lokhttp3/ResponseBody;'; @override ResponseBody fromReference(jni.JReference reference) => @@ -4262,12 +4265,12 @@ class OkHttpClient_Builder extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/OkHttpClient$Builder"); + static final _class = jni.JClass.forName(r'okhttp3/OkHttpClient$Builder'); /// The type which includes information such as the signature of this class. static const type = $OkHttpClient_BuilderType(); static final _id_new0 = _class.constructorId( - r"()V", + r'()V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -4275,7 +4278,7 @@ class OkHttpClient_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_NewObject") + )>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -4291,7 +4294,7 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_new1 = _class.constructorId( - r"(Lokhttp3/OkHttpClient;)V", + r'(Lokhttp3/OkHttpClient;)V', ); static final _new1 = ProtectedJniExtensions.lookup< @@ -4300,7 +4303,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") + 'globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4316,8 +4319,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_dispatcher = _class.instanceMethodId( - r"dispatcher", - r"(Lokhttp3/Dispatcher;)Lokhttp3/OkHttpClient$Builder;", + r'dispatcher', + r'(Lokhttp3/Dispatcher;)Lokhttp3/OkHttpClient$Builder;', ); static final _dispatcher = ProtectedJniExtensions.lookup< @@ -4326,7 +4329,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4342,8 +4345,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_connectionPool = _class.instanceMethodId( - r"connectionPool", - r"(Lokhttp3/ConnectionPool;)Lokhttp3/OkHttpClient$Builder;", + r'connectionPool', + r'(Lokhttp3/ConnectionPool;)Lokhttp3/OkHttpClient$Builder;', ); static final _connectionPool = ProtectedJniExtensions.lookup< @@ -4352,7 +4355,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4370,8 +4373,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_interceptors = _class.instanceMethodId( - r"interceptors", - r"()Ljava/util/List;", + r'interceptors', + r'()Ljava/util/List;', ); static final _interceptors = ProtectedJniExtensions.lookup< @@ -4379,7 +4382,7 @@ class OkHttpClient_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -4395,8 +4398,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_addInterceptor = _class.instanceMethodId( - r"addInterceptor", - r"(Lokhttp3/Interceptor;)Lokhttp3/OkHttpClient$Builder;", + r'addInterceptor', + r'(Lokhttp3/Interceptor;)Lokhttp3/OkHttpClient$Builder;', ); static final _addInterceptor = ProtectedJniExtensions.lookup< @@ -4405,7 +4408,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4423,8 +4426,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_networkInterceptors = _class.instanceMethodId( - r"networkInterceptors", - r"()Ljava/util/List;", + r'networkInterceptors', + r'()Ljava/util/List;', ); static final _networkInterceptors = ProtectedJniExtensions.lookup< @@ -4432,7 +4435,7 @@ class OkHttpClient_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -4448,8 +4451,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_addNetworkInterceptor = _class.instanceMethodId( - r"addNetworkInterceptor", - r"(Lokhttp3/Interceptor;)Lokhttp3/OkHttpClient$Builder;", + r'addNetworkInterceptor', + r'(Lokhttp3/Interceptor;)Lokhttp3/OkHttpClient$Builder;', ); static final _addNetworkInterceptor = ProtectedJniExtensions.lookup< @@ -4458,7 +4461,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4476,8 +4479,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_eventListener = _class.instanceMethodId( - r"eventListener", - r"(Lokhttp3/EventListener;)Lokhttp3/OkHttpClient$Builder;", + r'eventListener', + r'(Lokhttp3/EventListener;)Lokhttp3/OkHttpClient$Builder;', ); static final _eventListener = ProtectedJniExtensions.lookup< @@ -4486,7 +4489,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4504,8 +4507,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_eventListenerFactory = _class.instanceMethodId( - r"eventListenerFactory", - r"(Lokhttp3/EventListener$Factory;)Lokhttp3/OkHttpClient$Builder;", + r'eventListenerFactory', + r'(Lokhttp3/EventListener$Factory;)Lokhttp3/OkHttpClient$Builder;', ); static final _eventListenerFactory = ProtectedJniExtensions.lookup< @@ -4514,7 +4517,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4532,14 +4535,14 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_retryOnConnectionFailure = _class.instanceMethodId( - r"retryOnConnectionFailure", - r"(Z)Lokhttp3/OkHttpClient$Builder;", + r'retryOnConnectionFailure', + r'(Z)Lokhttp3/OkHttpClient$Builder;', ); static final _retryOnConnectionFailure = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Uint8,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<($Int32,)>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -4555,8 +4558,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_authenticator = _class.instanceMethodId( - r"authenticator", - r"(Lokhttp3/Authenticator;)Lokhttp3/OkHttpClient$Builder;", + r'authenticator', + r'(Lokhttp3/Authenticator;)Lokhttp3/OkHttpClient$Builder;', ); static final _authenticator = ProtectedJniExtensions.lookup< @@ -4565,7 +4568,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4583,14 +4586,14 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_followRedirects = _class.instanceMethodId( - r"followRedirects", - r"(Z)Lokhttp3/OkHttpClient$Builder;", + r'followRedirects', + r'(Z)Lokhttp3/OkHttpClient$Builder;', ); static final _followRedirects = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Uint8,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<($Int32,)>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -4606,14 +4609,14 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_followSslRedirects = _class.instanceMethodId( - r"followSslRedirects", - r"(Z)Lokhttp3/OkHttpClient$Builder;", + r'followSslRedirects', + r'(Z)Lokhttp3/OkHttpClient$Builder;', ); static final _followSslRedirects = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Uint8,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<($Int32,)>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -4629,8 +4632,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_cookieJar = _class.instanceMethodId( - r"cookieJar", - r"(Lokhttp3/CookieJar;)Lokhttp3/OkHttpClient$Builder;", + r'cookieJar', + r'(Lokhttp3/CookieJar;)Lokhttp3/OkHttpClient$Builder;', ); static final _cookieJar = ProtectedJniExtensions.lookup< @@ -4639,7 +4642,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4655,8 +4658,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_cache = _class.instanceMethodId( - r"cache", - r"(Lokhttp3/Cache;)Lokhttp3/OkHttpClient$Builder;", + r'cache', + r'(Lokhttp3/Cache;)Lokhttp3/OkHttpClient$Builder;', ); static final _cache = ProtectedJniExtensions.lookup< @@ -4665,7 +4668,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4681,8 +4684,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_dns = _class.instanceMethodId( - r"dns", - r"(Lokhttp3/Dns;)Lokhttp3/OkHttpClient$Builder;", + r'dns', + r'(Lokhttp3/Dns;)Lokhttp3/OkHttpClient$Builder;', ); static final _dns = ProtectedJniExtensions.lookup< @@ -4691,7 +4694,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4707,8 +4710,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_proxy = _class.instanceMethodId( - r"proxy", - r"(Ljava/net/Proxy;)Lokhttp3/OkHttpClient$Builder;", + r'proxy', + r'(Ljava/net/Proxy;)Lokhttp3/OkHttpClient$Builder;', ); static final _proxy = ProtectedJniExtensions.lookup< @@ -4717,7 +4720,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4733,8 +4736,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_proxySelector = _class.instanceMethodId( - r"proxySelector", - r"(Ljava/net/ProxySelector;)Lokhttp3/OkHttpClient$Builder;", + r'proxySelector', + r'(Ljava/net/ProxySelector;)Lokhttp3/OkHttpClient$Builder;', ); static final _proxySelector = ProtectedJniExtensions.lookup< @@ -4743,7 +4746,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4761,8 +4764,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_proxyAuthenticator = _class.instanceMethodId( - r"proxyAuthenticator", - r"(Lokhttp3/Authenticator;)Lokhttp3/OkHttpClient$Builder;", + r'proxyAuthenticator', + r'(Lokhttp3/Authenticator;)Lokhttp3/OkHttpClient$Builder;', ); static final _proxyAuthenticator = ProtectedJniExtensions.lookup< @@ -4771,7 +4774,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4789,8 +4792,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_socketFactory = _class.instanceMethodId( - r"socketFactory", - r"(Ljavax/net/SocketFactory;)Lokhttp3/OkHttpClient$Builder;", + r'socketFactory', + r'(Ljavax/net/SocketFactory;)Lokhttp3/OkHttpClient$Builder;', ); static final _socketFactory = ProtectedJniExtensions.lookup< @@ -4799,7 +4802,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4817,8 +4820,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_sslSocketFactory = _class.instanceMethodId( - r"sslSocketFactory", - r"(Ljavax/net/ssl/SSLSocketFactory;)Lokhttp3/OkHttpClient$Builder;", + r'sslSocketFactory', + r'(Ljavax/net/ssl/SSLSocketFactory;)Lokhttp3/OkHttpClient$Builder;', ); static final _sslSocketFactory = ProtectedJniExtensions.lookup< @@ -4827,7 +4830,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4845,8 +4848,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_sslSocketFactory1 = _class.instanceMethodId( - r"sslSocketFactory", - r"(Ljavax/net/ssl/SSLSocketFactory;Ljavax/net/ssl/X509TrustManager;)Lokhttp3/OkHttpClient$Builder;", + r'sslSocketFactory', + r'(Ljavax/net/ssl/SSLSocketFactory;Ljavax/net/ssl/X509TrustManager;)Lokhttp3/OkHttpClient$Builder;', ); static final _sslSocketFactory1 = ProtectedJniExtensions.lookup< @@ -4858,7 +4861,7 @@ class OkHttpClient_Builder extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -4878,8 +4881,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_connectionSpecs = _class.instanceMethodId( - r"connectionSpecs", - r"(Ljava/util/List;)Lokhttp3/OkHttpClient$Builder;", + r'connectionSpecs', + r'(Ljava/util/List;)Lokhttp3/OkHttpClient$Builder;', ); static final _connectionSpecs = ProtectedJniExtensions.lookup< @@ -4888,7 +4891,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4904,8 +4907,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_protocols = _class.instanceMethodId( - r"protocols", - r"(Ljava/util/List;)Lokhttp3/OkHttpClient$Builder;", + r'protocols', + r'(Ljava/util/List;)Lokhttp3/OkHttpClient$Builder;', ); static final _protocols = ProtectedJniExtensions.lookup< @@ -4914,7 +4917,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4930,8 +4933,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_hostnameVerifier = _class.instanceMethodId( - r"hostnameVerifier", - r"(Ljavax/net/ssl/HostnameVerifier;)Lokhttp3/OkHttpClient$Builder;", + r'hostnameVerifier', + r'(Ljavax/net/ssl/HostnameVerifier;)Lokhttp3/OkHttpClient$Builder;', ); static final _hostnameVerifier = ProtectedJniExtensions.lookup< @@ -4940,7 +4943,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4958,8 +4961,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_certificatePinner = _class.instanceMethodId( - r"certificatePinner", - r"(Lokhttp3/CertificatePinner;)Lokhttp3/OkHttpClient$Builder;", + r'certificatePinner', + r'(Lokhttp3/CertificatePinner;)Lokhttp3/OkHttpClient$Builder;', ); static final _certificatePinner = ProtectedJniExtensions.lookup< @@ -4968,7 +4971,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4986,8 +4989,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_callTimeout = _class.instanceMethodId( - r"callTimeout", - r"(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;", + r'callTimeout', + r'(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;', ); static final _callTimeout = ProtectedJniExtensions.lookup< @@ -4996,7 +4999,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, ffi.Pointer)>(); @@ -5013,8 +5016,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_callTimeout1 = _class.instanceMethodId( - r"callTimeout", - r"(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;", + r'callTimeout', + r'(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;', ); static final _callTimeout1 = ProtectedJniExtensions.lookup< @@ -5023,7 +5026,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -5039,8 +5042,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_connectTimeout = _class.instanceMethodId( - r"connectTimeout", - r"(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;", + r'connectTimeout', + r'(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;', ); static final _connectTimeout = ProtectedJniExtensions.lookup< @@ -5049,7 +5052,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, ffi.Pointer)>(); @@ -5069,8 +5072,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_connectTimeout1 = _class.instanceMethodId( - r"connectTimeout", - r"(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;", + r'connectTimeout', + r'(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;', ); static final _connectTimeout1 = ProtectedJniExtensions.lookup< @@ -5079,7 +5082,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -5095,8 +5098,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_readTimeout = _class.instanceMethodId( - r"readTimeout", - r"(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;", + r'readTimeout', + r'(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;', ); static final _readTimeout = ProtectedJniExtensions.lookup< @@ -5105,7 +5108,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, ffi.Pointer)>(); @@ -5122,8 +5125,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_readTimeout1 = _class.instanceMethodId( - r"readTimeout", - r"(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;", + r'readTimeout', + r'(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;', ); static final _readTimeout1 = ProtectedJniExtensions.lookup< @@ -5132,7 +5135,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -5148,8 +5151,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_writeTimeout = _class.instanceMethodId( - r"writeTimeout", - r"(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;", + r'writeTimeout', + r'(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;', ); static final _writeTimeout = ProtectedJniExtensions.lookup< @@ -5158,7 +5161,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, ffi.Pointer)>(); @@ -5175,8 +5178,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_writeTimeout1 = _class.instanceMethodId( - r"writeTimeout", - r"(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;", + r'writeTimeout', + r'(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;', ); static final _writeTimeout1 = ProtectedJniExtensions.lookup< @@ -5185,7 +5188,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -5201,8 +5204,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_pingInterval = _class.instanceMethodId( - r"pingInterval", - r"(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;", + r'pingInterval', + r'(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;', ); static final _pingInterval = ProtectedJniExtensions.lookup< @@ -5211,7 +5214,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, ffi.Pointer)>(); @@ -5228,8 +5231,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_pingInterval1 = _class.instanceMethodId( - r"pingInterval", - r"(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;", + r'pingInterval', + r'(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;', ); static final _pingInterval1 = ProtectedJniExtensions.lookup< @@ -5238,7 +5241,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -5254,14 +5257,14 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_minWebSocketMessageToCompress = _class.instanceMethodId( - r"minWebSocketMessageToCompress", - r"(J)Lokhttp3/OkHttpClient$Builder;", + r'minWebSocketMessageToCompress', + r'(J)Lokhttp3/OkHttpClient$Builder;', ); static final _minWebSocketMessageToCompress = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<(ffi.Int64,)>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -5277,8 +5280,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_build = _class.instanceMethodId( - r"build", - r"()Lokhttp3/OkHttpClient;", + r'build', + r'()Lokhttp3/OkHttpClient;', ); static final _build = ProtectedJniExtensions.lookup< @@ -5286,7 +5289,7 @@ class OkHttpClient_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5306,7 +5309,7 @@ final class $OkHttpClient_BuilderType const $OkHttpClient_BuilderType(); @override - String get signature => r"Lokhttp3/OkHttpClient$Builder;"; + String get signature => r'Lokhttp3/OkHttpClient$Builder;'; @override OkHttpClient_Builder fromReference(jni.JReference reference) => @@ -5337,12 +5340,12 @@ class OkHttpClient_Companion extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/OkHttpClient$Companion"); + static final _class = jni.JClass.forName(r'okhttp3/OkHttpClient$Companion'); /// The type which includes information such as the signature of this class. static const type = $OkHttpClient_CompanionType(); static final _id_new0 = _class.constructorId( - r"(Lkotlin/jvm/internal/DefaultConstructorMarker;)V", + r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -5351,7 +5354,7 @@ class OkHttpClient_Companion extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") + 'globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -5374,7 +5377,7 @@ final class $OkHttpClient_CompanionType const $OkHttpClient_CompanionType(); @override - String get signature => r"Lokhttp3/OkHttpClient$Companion;"; + String get signature => r'Lokhttp3/OkHttpClient$Companion;'; @override OkHttpClient_Companion fromReference(jni.JReference reference) => @@ -5405,13 +5408,13 @@ class OkHttpClient extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/OkHttpClient"); + static final _class = jni.JClass.forName(r'okhttp3/OkHttpClient'); /// The type which includes information such as the signature of this class. static const type = $OkHttpClientType(); static final _id_Companion = _class.staticFieldId( - r"Companion", - r"Lokhttp3/OkHttpClient$Companion;", + r'Companion', + r'Lokhttp3/OkHttpClient$Companion;', ); /// from: static public final okhttp3.OkHttpClient$Companion Companion @@ -5420,7 +5423,7 @@ class OkHttpClient extends jni.JObject { _id_Companion.get(_class, const $OkHttpClient_CompanionType()); static final _id_new0 = _class.constructorId( - r"(Lokhttp3/OkHttpClient$Builder;)V", + r'(Lokhttp3/OkHttpClient$Builder;)V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -5429,7 +5432,7 @@ class OkHttpClient extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") + 'globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -5445,8 +5448,8 @@ class OkHttpClient extends jni.JObject { } static final _id_dispatcher = _class.instanceMethodId( - r"dispatcher", - r"()Lokhttp3/Dispatcher;", + r'dispatcher', + r'()Lokhttp3/Dispatcher;', ); static final _dispatcher = ProtectedJniExtensions.lookup< @@ -5454,7 +5457,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5469,8 +5472,8 @@ class OkHttpClient extends jni.JObject { } static final _id_connectionPool = _class.instanceMethodId( - r"connectionPool", - r"()Lokhttp3/ConnectionPool;", + r'connectionPool', + r'()Lokhttp3/ConnectionPool;', ); static final _connectionPool = ProtectedJniExtensions.lookup< @@ -5478,7 +5481,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5494,8 +5497,8 @@ class OkHttpClient extends jni.JObject { } static final _id_interceptors = _class.instanceMethodId( - r"interceptors", - r"()Ljava/util/List;", + r'interceptors', + r'()Ljava/util/List;', ); static final _interceptors = ProtectedJniExtensions.lookup< @@ -5503,7 +5506,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5519,8 +5522,8 @@ class OkHttpClient extends jni.JObject { } static final _id_networkInterceptors = _class.instanceMethodId( - r"networkInterceptors", - r"()Ljava/util/List;", + r'networkInterceptors', + r'()Ljava/util/List;', ); static final _networkInterceptors = ProtectedJniExtensions.lookup< @@ -5528,7 +5531,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5544,8 +5547,8 @@ class OkHttpClient extends jni.JObject { } static final _id_eventListenerFactory = _class.instanceMethodId( - r"eventListenerFactory", - r"()Lokhttp3/EventListener$Factory;", + r'eventListenerFactory', + r'()Lokhttp3/EventListener$Factory;', ); static final _eventListenerFactory = ProtectedJniExtensions.lookup< @@ -5553,7 +5556,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5569,8 +5572,8 @@ class OkHttpClient extends jni.JObject { } static final _id_retryOnConnectionFailure = _class.instanceMethodId( - r"retryOnConnectionFailure", - r"()Z", + r'retryOnConnectionFailure', + r'()Z', ); static final _retryOnConnectionFailure = ProtectedJniExtensions.lookup< @@ -5578,7 +5581,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallBooleanMethod") + )>>('globalEnv_CallBooleanMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5593,8 +5596,8 @@ class OkHttpClient extends jni.JObject { } static final _id_authenticator = _class.instanceMethodId( - r"authenticator", - r"()Lokhttp3/Authenticator;", + r'authenticator', + r'()Lokhttp3/Authenticator;', ); static final _authenticator = ProtectedJniExtensions.lookup< @@ -5602,7 +5605,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5618,8 +5621,8 @@ class OkHttpClient extends jni.JObject { } static final _id_followRedirects = _class.instanceMethodId( - r"followRedirects", - r"()Z", + r'followRedirects', + r'()Z', ); static final _followRedirects = ProtectedJniExtensions.lookup< @@ -5627,7 +5630,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallBooleanMethod") + )>>('globalEnv_CallBooleanMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5642,8 +5645,8 @@ class OkHttpClient extends jni.JObject { } static final _id_followSslRedirects = _class.instanceMethodId( - r"followSslRedirects", - r"()Z", + r'followSslRedirects', + r'()Z', ); static final _followSslRedirects = ProtectedJniExtensions.lookup< @@ -5651,7 +5654,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallBooleanMethod") + )>>('globalEnv_CallBooleanMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5666,8 +5669,8 @@ class OkHttpClient extends jni.JObject { } static final _id_cookieJar = _class.instanceMethodId( - r"cookieJar", - r"()Lokhttp3/CookieJar;", + r'cookieJar', + r'()Lokhttp3/CookieJar;', ); static final _cookieJar = ProtectedJniExtensions.lookup< @@ -5675,7 +5678,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5690,8 +5693,8 @@ class OkHttpClient extends jni.JObject { } static final _id_cache = _class.instanceMethodId( - r"cache", - r"()Lokhttp3/Cache;", + r'cache', + r'()Lokhttp3/Cache;', ); static final _cache = ProtectedJniExtensions.lookup< @@ -5699,7 +5702,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5714,8 +5717,8 @@ class OkHttpClient extends jni.JObject { } static final _id_dns = _class.instanceMethodId( - r"dns", - r"()Lokhttp3/Dns;", + r'dns', + r'()Lokhttp3/Dns;', ); static final _dns = ProtectedJniExtensions.lookup< @@ -5723,7 +5726,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5738,8 +5741,8 @@ class OkHttpClient extends jni.JObject { } static final _id_proxy = _class.instanceMethodId( - r"proxy", - r"()Ljava/net/Proxy;", + r'proxy', + r'()Ljava/net/Proxy;', ); static final _proxy = ProtectedJniExtensions.lookup< @@ -5747,7 +5750,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5762,8 +5765,8 @@ class OkHttpClient extends jni.JObject { } static final _id_proxySelector = _class.instanceMethodId( - r"proxySelector", - r"()Ljava/net/ProxySelector;", + r'proxySelector', + r'()Ljava/net/ProxySelector;', ); static final _proxySelector = ProtectedJniExtensions.lookup< @@ -5771,7 +5774,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5787,8 +5790,8 @@ class OkHttpClient extends jni.JObject { } static final _id_proxyAuthenticator = _class.instanceMethodId( - r"proxyAuthenticator", - r"()Lokhttp3/Authenticator;", + r'proxyAuthenticator', + r'()Lokhttp3/Authenticator;', ); static final _proxyAuthenticator = ProtectedJniExtensions.lookup< @@ -5796,7 +5799,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5812,8 +5815,8 @@ class OkHttpClient extends jni.JObject { } static final _id_socketFactory = _class.instanceMethodId( - r"socketFactory", - r"()Ljavax/net/SocketFactory;", + r'socketFactory', + r'()Ljavax/net/SocketFactory;', ); static final _socketFactory = ProtectedJniExtensions.lookup< @@ -5821,7 +5824,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5837,8 +5840,8 @@ class OkHttpClient extends jni.JObject { } static final _id_sslSocketFactory = _class.instanceMethodId( - r"sslSocketFactory", - r"()Ljavax/net/ssl/SSLSocketFactory;", + r'sslSocketFactory', + r'()Ljavax/net/ssl/SSLSocketFactory;', ); static final _sslSocketFactory = ProtectedJniExtensions.lookup< @@ -5846,7 +5849,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5862,8 +5865,8 @@ class OkHttpClient extends jni.JObject { } static final _id_x509TrustManager = _class.instanceMethodId( - r"x509TrustManager", - r"()Ljavax/net/ssl/X509TrustManager;", + r'x509TrustManager', + r'()Ljavax/net/ssl/X509TrustManager;', ); static final _x509TrustManager = ProtectedJniExtensions.lookup< @@ -5871,7 +5874,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5887,8 +5890,8 @@ class OkHttpClient extends jni.JObject { } static final _id_connectionSpecs = _class.instanceMethodId( - r"connectionSpecs", - r"()Ljava/util/List;", + r'connectionSpecs', + r'()Ljava/util/List;', ); static final _connectionSpecs = ProtectedJniExtensions.lookup< @@ -5896,7 +5899,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5912,8 +5915,8 @@ class OkHttpClient extends jni.JObject { } static final _id_protocols = _class.instanceMethodId( - r"protocols", - r"()Ljava/util/List;", + r'protocols', + r'()Ljava/util/List;', ); static final _protocols = ProtectedJniExtensions.lookup< @@ -5921,7 +5924,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5936,8 +5939,8 @@ class OkHttpClient extends jni.JObject { } static final _id_hostnameVerifier = _class.instanceMethodId( - r"hostnameVerifier", - r"()Ljavax/net/ssl/HostnameVerifier;", + r'hostnameVerifier', + r'()Ljavax/net/ssl/HostnameVerifier;', ); static final _hostnameVerifier = ProtectedJniExtensions.lookup< @@ -5945,7 +5948,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5961,8 +5964,8 @@ class OkHttpClient extends jni.JObject { } static final _id_certificatePinner = _class.instanceMethodId( - r"certificatePinner", - r"()Lokhttp3/CertificatePinner;", + r'certificatePinner', + r'()Lokhttp3/CertificatePinner;', ); static final _certificatePinner = ProtectedJniExtensions.lookup< @@ -5970,7 +5973,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5986,8 +5989,8 @@ class OkHttpClient extends jni.JObject { } static final _id_certificateChainCleaner = _class.instanceMethodId( - r"certificateChainCleaner", - r"()Lokhttp3/internal/tls/CertificateChainCleaner;", + r'certificateChainCleaner', + r'()Lokhttp3/internal/tls/CertificateChainCleaner;', ); static final _certificateChainCleaner = ProtectedJniExtensions.lookup< @@ -5995,7 +5998,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6011,8 +6014,8 @@ class OkHttpClient extends jni.JObject { } static final _id_callTimeoutMillis = _class.instanceMethodId( - r"callTimeoutMillis", - r"()I", + r'callTimeoutMillis', + r'()I', ); static final _callTimeoutMillis = ProtectedJniExtensions.lookup< @@ -6020,7 +6023,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6035,8 +6038,8 @@ class OkHttpClient extends jni.JObject { } static final _id_connectTimeoutMillis = _class.instanceMethodId( - r"connectTimeoutMillis", - r"()I", + r'connectTimeoutMillis', + r'()I', ); static final _connectTimeoutMillis = ProtectedJniExtensions.lookup< @@ -6044,7 +6047,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6059,8 +6062,8 @@ class OkHttpClient extends jni.JObject { } static final _id_readTimeoutMillis = _class.instanceMethodId( - r"readTimeoutMillis", - r"()I", + r'readTimeoutMillis', + r'()I', ); static final _readTimeoutMillis = ProtectedJniExtensions.lookup< @@ -6068,7 +6071,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6083,8 +6086,8 @@ class OkHttpClient extends jni.JObject { } static final _id_writeTimeoutMillis = _class.instanceMethodId( - r"writeTimeoutMillis", - r"()I", + r'writeTimeoutMillis', + r'()I', ); static final _writeTimeoutMillis = ProtectedJniExtensions.lookup< @@ -6092,7 +6095,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6107,8 +6110,8 @@ class OkHttpClient extends jni.JObject { } static final _id_pingIntervalMillis = _class.instanceMethodId( - r"pingIntervalMillis", - r"()I", + r'pingIntervalMillis', + r'()I', ); static final _pingIntervalMillis = ProtectedJniExtensions.lookup< @@ -6116,7 +6119,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6131,8 +6134,8 @@ class OkHttpClient extends jni.JObject { } static final _id_minWebSocketMessageToCompress = _class.instanceMethodId( - r"minWebSocketMessageToCompress", - r"()J", + r'minWebSocketMessageToCompress', + r'()J', ); static final _minWebSocketMessageToCompress = ProtectedJniExtensions.lookup< @@ -6140,7 +6143,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallLongMethod") + )>>('globalEnv_CallLongMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6155,8 +6158,8 @@ class OkHttpClient extends jni.JObject { } static final _id_getRouteDatabase = _class.instanceMethodId( - r"getRouteDatabase", - r"()Lokhttp3/internal/connection/RouteDatabase;", + r'getRouteDatabase', + r'()Lokhttp3/internal/connection/RouteDatabase;', ); static final _getRouteDatabase = ProtectedJniExtensions.lookup< @@ -6164,7 +6167,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6180,7 +6183,7 @@ class OkHttpClient extends jni.JObject { } static final _id_new1 = _class.constructorId( - r"()V", + r'()V', ); static final _new1 = ProtectedJniExtensions.lookup< @@ -6188,7 +6191,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_NewObject") + )>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6204,8 +6207,8 @@ class OkHttpClient extends jni.JObject { } static final _id_newCall = _class.instanceMethodId( - r"newCall", - r"(Lokhttp3/Request;)Lokhttp3/Call;", + r'newCall', + r'(Lokhttp3/Request;)Lokhttp3/Call;', ); static final _newCall = ProtectedJniExtensions.lookup< @@ -6214,7 +6217,7 @@ class OkHttpClient extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -6230,8 +6233,8 @@ class OkHttpClient extends jni.JObject { } static final _id_newWebSocket = _class.instanceMethodId( - r"newWebSocket", - r"(Lokhttp3/Request;Lokhttp3/WebSocketListener;)Lokhttp3/WebSocket;", + r'newWebSocket', + r'(Lokhttp3/Request;Lokhttp3/WebSocketListener;)Lokhttp3/WebSocket;', ); static final _newWebSocket = ProtectedJniExtensions.lookup< @@ -6243,14 +6246,14 @@ class OkHttpClient extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); /// from: public okhttp3.WebSocket newWebSocket(okhttp3.Request request, okhttp3.WebSocketListener webSocketListener) /// The returned object must be released after use, by calling the [release] method. - jni.JObject newWebSocket( + WebSocket newWebSocket( Request request, jni.JObject webSocketListener, ) { @@ -6259,12 +6262,12 @@ class OkHttpClient extends jni.JObject { _id_newWebSocket as jni.JMethodIDPtr, request.reference.pointer, webSocketListener.reference.pointer) - .object(const jni.JObjectType()); + .object(const $WebSocketType()); } static final _id_newBuilder = _class.instanceMethodId( - r"newBuilder", - r"()Lokhttp3/OkHttpClient$Builder;", + r'newBuilder', + r'()Lokhttp3/OkHttpClient$Builder;', ); static final _newBuilder = ProtectedJniExtensions.lookup< @@ -6272,7 +6275,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6287,8 +6290,8 @@ class OkHttpClient extends jni.JObject { } static final _id_clone = _class.instanceMethodId( - r"clone", - r"()Ljava/lang/Object;", + r'clone', + r'()Ljava/lang/Object;', ); static final _clone = ProtectedJniExtensions.lookup< @@ -6296,7 +6299,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6315,7 +6318,7 @@ final class $OkHttpClientType extends jni.JObjType { const $OkHttpClientType(); @override - String get signature => r"Lokhttp3/OkHttpClient;"; + String get signature => r'Lokhttp3/OkHttpClient;'; @override OkHttpClient fromReference(jni.JReference reference) => @@ -6346,13 +6349,13 @@ class Call_Factory extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/Call$Factory"); + static final _class = jni.JClass.forName(r'okhttp3/Call$Factory'); /// The type which includes information such as the signature of this class. static const type = $Call_FactoryType(); static final _id_newCall = _class.instanceMethodId( - r"newCall", - r"(Lokhttp3/Request;)Lokhttp3/Call;", + r'newCall', + r'(Lokhttp3/Request;)Lokhttp3/Call;', ); static final _newCall = ProtectedJniExtensions.lookup< @@ -6361,7 +6364,7 @@ class Call_Factory extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -6408,7 +6411,7 @@ class Call_Factory extends jni.JObject { try { final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); final $a = $i.args; - if ($d == r"newCall(Lokhttp3/Request;)Lokhttp3/Call;") { + if ($d == r'newCall(Lokhttp3/Request;)Lokhttp3/Call;') { final $r = _$impls[$p]!.newCall( $a[0].castTo(const $RequestType(), releaseOriginal: true), ); @@ -6418,7 +6421,7 @@ class Call_Factory extends jni.JObject { .toPointer(); } } catch (e) { - return ProtectedJniExtensions.newDartException(e.toString()); + return ProtectedJniExtensions.newDartException(e); } return jni.nullptr; } @@ -6429,7 +6432,7 @@ class Call_Factory extends jni.JObject { final $p = ReceivePort(); final $x = Call_Factory.fromReference( ProtectedJniExtensions.newPortProxy( - r"okhttp3.Call$Factory", + r'okhttp3.Call$Factory', $p, _$invokePointer, ), @@ -6474,7 +6477,7 @@ final class $Call_FactoryType extends jni.JObjType { const $Call_FactoryType(); @override - String get signature => r"Lokhttp3/Call$Factory;"; + String get signature => r'Lokhttp3/Call$Factory;'; @override Call_Factory fromReference(jni.JReference reference) => @@ -6505,13 +6508,13 @@ class Call extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/Call"); + static final _class = jni.JClass.forName(r'okhttp3/Call'); /// The type which includes information such as the signature of this class. static const type = $CallType(); static final _id_request = _class.instanceMethodId( - r"request", - r"()Lokhttp3/Request;", + r'request', + r'()Lokhttp3/Request;', ); static final _request = ProtectedJniExtensions.lookup< @@ -6519,7 +6522,7 @@ class Call extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6534,8 +6537,8 @@ class Call extends jni.JObject { } static final _id_execute = _class.instanceMethodId( - r"execute", - r"()Lokhttp3/Response;", + r'execute', + r'()Lokhttp3/Response;', ); static final _execute = ProtectedJniExtensions.lookup< @@ -6543,7 +6546,7 @@ class Call extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6558,8 +6561,8 @@ class Call extends jni.JObject { } static final _id_enqueue = _class.instanceMethodId( - r"enqueue", - r"(Lokhttp3/Callback;)V", + r'enqueue', + r'(Lokhttp3/Callback;)V', ); static final _enqueue = ProtectedJniExtensions.lookup< @@ -6568,7 +6571,7 @@ class Call extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallVoidMethod") + 'globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -6583,8 +6586,8 @@ class Call extends jni.JObject { } static final _id_cancel = _class.instanceMethodId( - r"cancel", - r"()V", + r'cancel', + r'()V', ); static final _cancel = ProtectedJniExtensions.lookup< @@ -6592,7 +6595,7 @@ class Call extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") + )>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -6605,8 +6608,8 @@ class Call extends jni.JObject { } static final _id_isExecuted = _class.instanceMethodId( - r"isExecuted", - r"()Z", + r'isExecuted', + r'()Z', ); static final _isExecuted = ProtectedJniExtensions.lookup< @@ -6614,7 +6617,7 @@ class Call extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallBooleanMethod") + )>>('globalEnv_CallBooleanMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6628,8 +6631,8 @@ class Call extends jni.JObject { } static final _id_isCanceled = _class.instanceMethodId( - r"isCanceled", - r"()Z", + r'isCanceled', + r'()Z', ); static final _isCanceled = ProtectedJniExtensions.lookup< @@ -6637,7 +6640,7 @@ class Call extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallBooleanMethod") + )>>('globalEnv_CallBooleanMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6651,8 +6654,8 @@ class Call extends jni.JObject { } static final _id_timeout = _class.instanceMethodId( - r"timeout", - r"()Lokio/Timeout;", + r'timeout', + r'()Lokio/Timeout;', ); static final _timeout = ProtectedJniExtensions.lookup< @@ -6660,7 +6663,7 @@ class Call extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6675,8 +6678,8 @@ class Call extends jni.JObject { } static final _id_clone = _class.instanceMethodId( - r"clone", - r"()Lokhttp3/Call;", + r'clone', + r'()Lokhttp3/Call;', ); static final _clone = ProtectedJniExtensions.lookup< @@ -6684,7 +6687,7 @@ class Call extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6730,46 +6733,46 @@ class Call extends jni.JObject { try { final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); final $a = $i.args; - if ($d == r"request()Lokhttp3/Request;") { + if ($d == r'request()Lokhttp3/Request;') { final $r = _$impls[$p]!.request(); return ($r as jni.JObject) .castTo(const jni.JObjectType()) .reference .toPointer(); } - if ($d == r"execute()Lokhttp3/Response;") { + if ($d == r'execute()Lokhttp3/Response;') { final $r = _$impls[$p]!.execute(); return ($r as jni.JObject) .castTo(const jni.JObjectType()) .reference .toPointer(); } - if ($d == r"enqueue(Lokhttp3/Callback;)V") { + if ($d == r'enqueue(Lokhttp3/Callback;)V') { _$impls[$p]!.enqueue( $a[0].castTo(const $CallbackType(), releaseOriginal: true), ); return jni.nullptr; } - if ($d == r"cancel()V") { + if ($d == r'cancel()V') { _$impls[$p]!.cancel(); return jni.nullptr; } - if ($d == r"isExecuted()Z") { + if ($d == r'isExecuted()Z') { final $r = _$impls[$p]!.isExecuted(); return jni.JBoolean($r).reference.toPointer(); } - if ($d == r"isCanceled()Z") { + if ($d == r'isCanceled()Z') { final $r = _$impls[$p]!.isCanceled(); return jni.JBoolean($r).reference.toPointer(); } - if ($d == r"timeout()Lokio/Timeout;") { + if ($d == r'timeout()Lokio/Timeout;') { final $r = _$impls[$p]!.timeout(); return ($r as jni.JObject) .castTo(const jni.JObjectType()) .reference .toPointer(); } - if ($d == r"clone()Lokhttp3/Call;") { + if ($d == r'clone()Lokhttp3/Call;') { final $r = _$impls[$p]!.clone(); return ($r as jni.JObject) .castTo(const jni.JObjectType()) @@ -6777,7 +6780,7 @@ class Call extends jni.JObject { .toPointer(); } } catch (e) { - return ProtectedJniExtensions.newDartException(e.toString()); + return ProtectedJniExtensions.newDartException(e); } return jni.nullptr; } @@ -6788,7 +6791,7 @@ class Call extends jni.JObject { final $p = ReceivePort(); final $x = Call.fromReference( ProtectedJniExtensions.newPortProxy( - r"okhttp3.Call", + r'okhttp3.Call', $p, _$invokePointer, ), @@ -6896,7 +6899,7 @@ final class $CallType extends jni.JObjType { const $CallType(); @override - String get signature => r"Lokhttp3/Call;"; + String get signature => r'Lokhttp3/Call;'; @override Call fromReference(jni.JReference reference) => Call.fromReference(reference); @@ -6925,12 +6928,12 @@ class Headers_Builder extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/Headers$Builder"); + static final _class = jni.JClass.forName(r'okhttp3/Headers$Builder'); /// The type which includes information such as the signature of this class. static const type = $Headers_BuilderType(); static final _id_new0 = _class.constructorId( - r"()V", + r'()V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -6938,7 +6941,7 @@ class Headers_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_NewObject") + )>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6954,8 +6957,8 @@ class Headers_Builder extends jni.JObject { } static final _id_add = _class.instanceMethodId( - r"add", - r"(Ljava/lang/String;)Lokhttp3/Headers$Builder;", + r'add', + r'(Ljava/lang/String;)Lokhttp3/Headers$Builder;', ); static final _add = ProtectedJniExtensions.lookup< @@ -6964,7 +6967,7 @@ class Headers_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -6980,8 +6983,8 @@ class Headers_Builder extends jni.JObject { } static final _id_add1 = _class.instanceMethodId( - r"add", - r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$Builder;", + r'add', + r'(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$Builder;', ); static final _add1 = ProtectedJniExtensions.lookup< @@ -6993,7 +6996,7 @@ class Headers_Builder extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -7010,8 +7013,8 @@ class Headers_Builder extends jni.JObject { } static final _id_addUnsafeNonAscii = _class.instanceMethodId( - r"addUnsafeNonAscii", - r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$Builder;", + r'addUnsafeNonAscii', + r'(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$Builder;', ); static final _addUnsafeNonAscii = ProtectedJniExtensions.lookup< @@ -7023,7 +7026,7 @@ class Headers_Builder extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -7043,8 +7046,8 @@ class Headers_Builder extends jni.JObject { } static final _id_addAll = _class.instanceMethodId( - r"addAll", - r"(Lokhttp3/Headers;)Lokhttp3/Headers$Builder;", + r'addAll', + r'(Lokhttp3/Headers;)Lokhttp3/Headers$Builder;', ); static final _addAll = ProtectedJniExtensions.lookup< @@ -7053,7 +7056,7 @@ class Headers_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -7069,8 +7072,8 @@ class Headers_Builder extends jni.JObject { } static final _id_add2 = _class.instanceMethodId( - r"add", - r"(Ljava/lang/String;Ljava/util/Date;)Lokhttp3/Headers$Builder;", + r'add', + r'(Ljava/lang/String;Ljava/util/Date;)Lokhttp3/Headers$Builder;', ); static final _add2 = ProtectedJniExtensions.lookup< @@ -7082,7 +7085,7 @@ class Headers_Builder extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -7099,8 +7102,8 @@ class Headers_Builder extends jni.JObject { } static final _id_add3 = _class.instanceMethodId( - r"add", - r"(Ljava/lang/String;Ljava/time/Instant;)Lokhttp3/Headers$Builder;", + r'add', + r'(Ljava/lang/String;Ljava/time/Instant;)Lokhttp3/Headers$Builder;', ); static final _add3 = ProtectedJniExtensions.lookup< @@ -7112,7 +7115,7 @@ class Headers_Builder extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -7129,8 +7132,8 @@ class Headers_Builder extends jni.JObject { } static final _id_set0 = _class.instanceMethodId( - r"set", - r"(Ljava/lang/String;Ljava/util/Date;)Lokhttp3/Headers$Builder;", + r'set', + r'(Ljava/lang/String;Ljava/util/Date;)Lokhttp3/Headers$Builder;', ); static final _set0 = ProtectedJniExtensions.lookup< @@ -7142,7 +7145,7 @@ class Headers_Builder extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -7159,8 +7162,8 @@ class Headers_Builder extends jni.JObject { } static final _id_set1 = _class.instanceMethodId( - r"set", - r"(Ljava/lang/String;Ljava/time/Instant;)Lokhttp3/Headers$Builder;", + r'set', + r'(Ljava/lang/String;Ljava/time/Instant;)Lokhttp3/Headers$Builder;', ); static final _set1 = ProtectedJniExtensions.lookup< @@ -7172,7 +7175,7 @@ class Headers_Builder extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -7189,8 +7192,8 @@ class Headers_Builder extends jni.JObject { } static final _id_removeAll = _class.instanceMethodId( - r"removeAll", - r"(Ljava/lang/String;)Lokhttp3/Headers$Builder;", + r'removeAll', + r'(Ljava/lang/String;)Lokhttp3/Headers$Builder;', ); static final _removeAll = ProtectedJniExtensions.lookup< @@ -7199,7 +7202,7 @@ class Headers_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -7215,8 +7218,8 @@ class Headers_Builder extends jni.JObject { } static final _id_set2 = _class.instanceMethodId( - r"set", - r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$Builder;", + r'set', + r'(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$Builder;', ); static final _set2 = ProtectedJniExtensions.lookup< @@ -7228,7 +7231,7 @@ class Headers_Builder extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -7245,8 +7248,8 @@ class Headers_Builder extends jni.JObject { } static final _id_get0 = _class.instanceMethodId( - r"get", - r"(Ljava/lang/String;)Ljava/lang/String;", + r'get', + r'(Ljava/lang/String;)Ljava/lang/String;', ); static final _get0 = ProtectedJniExtensions.lookup< @@ -7255,7 +7258,7 @@ class Headers_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -7271,8 +7274,8 @@ class Headers_Builder extends jni.JObject { } static final _id_build = _class.instanceMethodId( - r"build", - r"()Lokhttp3/Headers;", + r'build', + r'()Lokhttp3/Headers;', ); static final _build = ProtectedJniExtensions.lookup< @@ -7280,7 +7283,7 @@ class Headers_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -7299,7 +7302,7 @@ final class $Headers_BuilderType extends jni.JObjType { const $Headers_BuilderType(); @override - String get signature => r"Lokhttp3/Headers$Builder;"; + String get signature => r'Lokhttp3/Headers$Builder;'; @override Headers_Builder fromReference(jni.JReference reference) => @@ -7330,13 +7333,13 @@ class Headers_Companion extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/Headers$Companion"); + static final _class = jni.JClass.forName(r'okhttp3/Headers$Companion'); /// The type which includes information such as the signature of this class. static const type = $Headers_CompanionType(); static final _id_of = _class.instanceMethodId( - r"of", - r"([Ljava/lang/String;)Lokhttp3/Headers;", + r'of', + r'([Ljava/lang/String;)Lokhttp3/Headers;', ); static final _of = ProtectedJniExtensions.lookup< @@ -7345,7 +7348,7 @@ class Headers_Companion extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -7361,8 +7364,8 @@ class Headers_Companion extends jni.JObject { } static final _id_of1 = _class.instanceMethodId( - r"of", - r"(Ljava/util/Map;)Lokhttp3/Headers;", + r'of', + r'(Ljava/util/Map;)Lokhttp3/Headers;', ); static final _of1 = ProtectedJniExtensions.lookup< @@ -7371,7 +7374,7 @@ class Headers_Companion extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -7387,7 +7390,7 @@ class Headers_Companion extends jni.JObject { } static final _id_new0 = _class.constructorId( - r"(Lkotlin/jvm/internal/DefaultConstructorMarker;)V", + r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -7396,7 +7399,7 @@ class Headers_Companion extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") + 'globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -7418,7 +7421,7 @@ final class $Headers_CompanionType extends jni.JObjType { const $Headers_CompanionType(); @override - String get signature => r"Lokhttp3/Headers$Companion;"; + String get signature => r'Lokhttp3/Headers$Companion;'; @override Headers_Companion fromReference(jni.JReference reference) => @@ -7449,13 +7452,13 @@ class Headers extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/Headers"); + static final _class = jni.JClass.forName(r'okhttp3/Headers'); /// The type which includes information such as the signature of this class. static const type = $HeadersType(); static final _id_Companion = _class.staticFieldId( - r"Companion", - r"Lokhttp3/Headers$Companion;", + r'Companion', + r'Lokhttp3/Headers$Companion;', ); /// from: static public final okhttp3.Headers$Companion Companion @@ -7464,8 +7467,8 @@ class Headers extends jni.JObject { _id_Companion.get(_class, const $Headers_CompanionType()); static final _id_get0 = _class.instanceMethodId( - r"get", - r"(Ljava/lang/String;)Ljava/lang/String;", + r'get', + r'(Ljava/lang/String;)Ljava/lang/String;', ); static final _get0 = ProtectedJniExtensions.lookup< @@ -7474,7 +7477,7 @@ class Headers extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -7490,8 +7493,8 @@ class Headers extends jni.JObject { } static final _id_getDate = _class.instanceMethodId( - r"getDate", - r"(Ljava/lang/String;)Ljava/util/Date;", + r'getDate', + r'(Ljava/lang/String;)Ljava/util/Date;', ); static final _getDate = ProtectedJniExtensions.lookup< @@ -7500,7 +7503,7 @@ class Headers extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -7516,8 +7519,8 @@ class Headers extends jni.JObject { } static final _id_getInstant = _class.instanceMethodId( - r"getInstant", - r"(Ljava/lang/String;)Ljava/time/Instant;", + r'getInstant', + r'(Ljava/lang/String;)Ljava/time/Instant;', ); static final _getInstant = ProtectedJniExtensions.lookup< @@ -7526,7 +7529,7 @@ class Headers extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -7542,8 +7545,8 @@ class Headers extends jni.JObject { } static final _id_size = _class.instanceMethodId( - r"size", - r"()I", + r'size', + r'()I', ); static final _size = ProtectedJniExtensions.lookup< @@ -7551,7 +7554,7 @@ class Headers extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -7564,14 +7567,14 @@ class Headers extends jni.JObject { } static final _id_name = _class.instanceMethodId( - r"name", - r"(I)Ljava/lang/String;", + r'name', + r'(I)Ljava/lang/String;', ); static final _name = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int32,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<($Int32,)>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -7586,14 +7589,14 @@ class Headers extends jni.JObject { } static final _id_value = _class.instanceMethodId( - r"value", - r"(I)Ljava/lang/String;", + r'value', + r'(I)Ljava/lang/String;', ); static final _value = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int32,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<($Int32,)>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -7608,8 +7611,8 @@ class Headers extends jni.JObject { } static final _id_names = _class.instanceMethodId( - r"names", - r"()Ljava/util/Set;", + r'names', + r'()Ljava/util/Set;', ); static final _names = ProtectedJniExtensions.lookup< @@ -7617,7 +7620,7 @@ class Headers extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -7632,8 +7635,8 @@ class Headers extends jni.JObject { } static final _id_values = _class.instanceMethodId( - r"values", - r"(Ljava/lang/String;)Ljava/util/List;", + r'values', + r'(Ljava/lang/String;)Ljava/util/List;', ); static final _values = ProtectedJniExtensions.lookup< @@ -7642,7 +7645,7 @@ class Headers extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -7658,8 +7661,8 @@ class Headers extends jni.JObject { } static final _id_byteCount = _class.instanceMethodId( - r"byteCount", - r"()J", + r'byteCount', + r'()J', ); static final _byteCount = ProtectedJniExtensions.lookup< @@ -7667,7 +7670,7 @@ class Headers extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallLongMethod") + )>>('globalEnv_CallLongMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -7681,8 +7684,8 @@ class Headers extends jni.JObject { } static final _id_iterator = _class.instanceMethodId( - r"iterator", - r"()Ljava/util/Iterator;", + r'iterator', + r'()Ljava/util/Iterator;', ); static final _iterator = ProtectedJniExtensions.lookup< @@ -7690,7 +7693,7 @@ class Headers extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -7705,8 +7708,8 @@ class Headers extends jni.JObject { } static final _id_newBuilder = _class.instanceMethodId( - r"newBuilder", - r"()Lokhttp3/Headers$Builder;", + r'newBuilder', + r'()Lokhttp3/Headers$Builder;', ); static final _newBuilder = ProtectedJniExtensions.lookup< @@ -7714,7 +7717,7 @@ class Headers extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -7729,8 +7732,8 @@ class Headers extends jni.JObject { } static final _id_equals = _class.instanceMethodId( - r"equals", - r"(Ljava/lang/Object;)Z", + r'equals', + r'(Ljava/lang/Object;)Z', ); static final _equals = ProtectedJniExtensions.lookup< @@ -7739,7 +7742,7 @@ class Headers extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallBooleanMethod") + 'globalEnv_CallBooleanMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -7754,8 +7757,8 @@ class Headers extends jni.JObject { } static final _id_hashCode1 = _class.instanceMethodId( - r"hashCode", - r"()I", + r'hashCode', + r'()I', ); static final _hashCode1 = ProtectedJniExtensions.lookup< @@ -7763,7 +7766,7 @@ class Headers extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -7777,8 +7780,8 @@ class Headers extends jni.JObject { } static final _id_toString1 = _class.instanceMethodId( - r"toString", - r"()Ljava/lang/String;", + r'toString', + r'()Ljava/lang/String;', ); static final _toString1 = ProtectedJniExtensions.lookup< @@ -7786,7 +7789,7 @@ class Headers extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -7801,8 +7804,8 @@ class Headers extends jni.JObject { } static final _id_toMultimap = _class.instanceMethodId( - r"toMultimap", - r"()Ljava/util/Map;", + r'toMultimap', + r'()Ljava/util/Map;', ); static final _toMultimap = ProtectedJniExtensions.lookup< @@ -7810,7 +7813,7 @@ class Headers extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -7826,8 +7829,8 @@ class Headers extends jni.JObject { } static final _id_of = _class.staticMethodId( - r"of", - r"([Ljava/lang/String;)Lokhttp3/Headers;", + r'of', + r'([Ljava/lang/String;)Lokhttp3/Headers;', ); static final _of = ProtectedJniExtensions.lookup< @@ -7836,7 +7839,7 @@ class Headers extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallStaticObjectMethod") + 'globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -7852,8 +7855,8 @@ class Headers extends jni.JObject { } static final _id_of1 = _class.staticMethodId( - r"of", - r"(Ljava/util/Map;)Lokhttp3/Headers;", + r'of', + r'(Ljava/util/Map;)Lokhttp3/Headers;', ); static final _of1 = ProtectedJniExtensions.lookup< @@ -7862,7 +7865,7 @@ class Headers extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallStaticObjectMethod") + 'globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -7878,7 +7881,7 @@ class Headers extends jni.JObject { } static final _id_new0 = _class.constructorId( - r"([Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V", + r'([Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -7890,7 +7893,7 @@ class Headers extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_NewObject") + )>)>>('globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -7914,7 +7917,7 @@ final class $HeadersType extends jni.JObjType { const $HeadersType(); @override - String get signature => r"Lokhttp3/Headers;"; + String get signature => r'Lokhttp3/Headers;'; @override Headers fromReference(jni.JReference reference) => @@ -7944,13 +7947,13 @@ class Callback extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/Callback"); + static final _class = jni.JClass.forName(r'okhttp3/Callback'); /// The type which includes information such as the signature of this class. static const type = $CallbackType(); static final _id_onFailure = _class.instanceMethodId( - r"onFailure", - r"(Lokhttp3/Call;Ljava/io/IOException;)V", + r'onFailure', + r'(Lokhttp3/Call;Ljava/io/IOException;)V', ); static final _onFailure = ProtectedJniExtensions.lookup< @@ -7962,7 +7965,7 @@ class Callback extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallVoidMethod") + )>)>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -7978,8 +7981,8 @@ class Callback extends jni.JObject { } static final _id_onResponse = _class.instanceMethodId( - r"onResponse", - r"(Lokhttp3/Call;Lokhttp3/Response;)V", + r'onResponse', + r'(Lokhttp3/Call;Lokhttp3/Response;)V', ); static final _onResponse = ProtectedJniExtensions.lookup< @@ -7991,7 +7994,7 @@ class Callback extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallVoidMethod") + )>)>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -8038,14 +8041,14 @@ class Callback extends jni.JObject { try { final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); final $a = $i.args; - if ($d == r"onFailure(Lokhttp3/Call;Ljava/io/IOException;)V") { + if ($d == r'onFailure(Lokhttp3/Call;Ljava/io/IOException;)V') { _$impls[$p]!.onFailure( $a[0].castTo(const $CallType(), releaseOriginal: true), $a[1].castTo(const jni.JObjectType(), releaseOriginal: true), ); return jni.nullptr; } - if ($d == r"onResponse(Lokhttp3/Call;Lokhttp3/Response;)V") { + if ($d == r'onResponse(Lokhttp3/Call;Lokhttp3/Response;)V') { _$impls[$p]!.onResponse( $a[0].castTo(const $CallType(), releaseOriginal: true), $a[1].castTo(const $ResponseType(), releaseOriginal: true), @@ -8053,7 +8056,7 @@ class Callback extends jni.JObject { return jni.nullptr; } } catch (e) { - return ProtectedJniExtensions.newDartException(e.toString()); + return ProtectedJniExtensions.newDartException(e); } return jni.nullptr; } @@ -8064,7 +8067,7 @@ class Callback extends jni.JObject { final $p = ReceivePort(); final $x = Callback.fromReference( ProtectedJniExtensions.newPortProxy( - r"okhttp3.Callback", + r'okhttp3.Callback', $p, _$invokePointer, ), @@ -8118,7 +8121,7 @@ final class $CallbackType extends jni.JObjType { const $CallbackType(); @override - String get signature => r"Lokhttp3/Callback;"; + String get signature => r'Lokhttp3/Callback;'; @override Callback fromReference(jni.JReference reference) => @@ -8148,12 +8151,12 @@ class ConnectionPool extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/ConnectionPool"); + static final _class = jni.JClass.forName(r'okhttp3/ConnectionPool'); /// The type which includes information such as the signature of this class. static const type = $ConnectionPoolType(); static final _id_new0 = _class.constructorId( - r"(Lokhttp3/internal/connection/RealConnectionPool;)V", + r'(Lokhttp3/internal/connection/RealConnectionPool;)V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -8162,7 +8165,7 @@ class ConnectionPool extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") + 'globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -8178,7 +8181,7 @@ class ConnectionPool extends jni.JObject { } static final _id_new1 = _class.constructorId( - r"(IJLjava/util/concurrent/TimeUnit;)V", + r'(IJLjava/util/concurrent/TimeUnit;)V', ); static final _new1 = ProtectedJniExtensions.lookup< @@ -8188,10 +8191,10 @@ class ConnectionPool extends jni.JObject { jni.JMethodIDPtr, ffi.VarArgs< ( - ffi.Int32, + $Int32, ffi.Int64, ffi.Pointer - )>)>>("globalEnv_NewObject") + )>)>>('globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, int, ffi.Pointer)>(); @@ -8209,7 +8212,7 @@ class ConnectionPool extends jni.JObject { } static final _id_new2 = _class.constructorId( - r"()V", + r'()V', ); static final _new2 = ProtectedJniExtensions.lookup< @@ -8217,7 +8220,7 @@ class ConnectionPool extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_NewObject") + )>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -8233,8 +8236,8 @@ class ConnectionPool extends jni.JObject { } static final _id_idleConnectionCount = _class.instanceMethodId( - r"idleConnectionCount", - r"()I", + r'idleConnectionCount', + r'()I', ); static final _idleConnectionCount = ProtectedJniExtensions.lookup< @@ -8242,7 +8245,7 @@ class ConnectionPool extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -8257,8 +8260,8 @@ class ConnectionPool extends jni.JObject { } static final _id_connectionCount = _class.instanceMethodId( - r"connectionCount", - r"()I", + r'connectionCount', + r'()I', ); static final _connectionCount = ProtectedJniExtensions.lookup< @@ -8266,7 +8269,7 @@ class ConnectionPool extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -8281,8 +8284,8 @@ class ConnectionPool extends jni.JObject { } static final _id_evictAll = _class.instanceMethodId( - r"evictAll", - r"()V", + r'evictAll', + r'()V', ); static final _evictAll = ProtectedJniExtensions.lookup< @@ -8290,7 +8293,7 @@ class ConnectionPool extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") + )>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -8307,7 +8310,7 @@ final class $ConnectionPoolType extends jni.JObjType { const $ConnectionPoolType(); @override - String get signature => r"Lokhttp3/ConnectionPool;"; + String get signature => r'Lokhttp3/ConnectionPool;'; @override ConnectionPool fromReference(jni.JReference reference) => @@ -8338,12 +8341,12 @@ class Dispatcher extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/Dispatcher"); + static final _class = jni.JClass.forName(r'okhttp3/Dispatcher'); /// The type which includes information such as the signature of this class. static const type = $DispatcherType(); static final _id_new0 = _class.constructorId( - r"()V", + r'()V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -8351,7 +8354,7 @@ class Dispatcher extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_NewObject") + )>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -8367,8 +8370,8 @@ class Dispatcher extends jni.JObject { } static final _id_getMaxRequests = _class.instanceMethodId( - r"getMaxRequests", - r"()I", + r'getMaxRequests', + r'()I', ); static final _getMaxRequests = ProtectedJniExtensions.lookup< @@ -8376,7 +8379,7 @@ class Dispatcher extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -8391,8 +8394,8 @@ class Dispatcher extends jni.JObject { } static final _id_setMaxRequests = _class.instanceMethodId( - r"setMaxRequests", - r"(I)V", + r'setMaxRequests', + r'(I)V', ); static final _setMaxRequests = ProtectedJniExtensions.lookup< @@ -8400,7 +8403,7 @@ class Dispatcher extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int32,)>)>>("globalEnv_CallVoidMethod") + ffi.VarArgs<($Int32,)>)>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -8415,8 +8418,8 @@ class Dispatcher extends jni.JObject { } static final _id_getMaxRequestsPerHost = _class.instanceMethodId( - r"getMaxRequestsPerHost", - r"()I", + r'getMaxRequestsPerHost', + r'()I', ); static final _getMaxRequestsPerHost = ProtectedJniExtensions.lookup< @@ -8424,7 +8427,7 @@ class Dispatcher extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -8439,8 +8442,8 @@ class Dispatcher extends jni.JObject { } static final _id_setMaxRequestsPerHost = _class.instanceMethodId( - r"setMaxRequestsPerHost", - r"(I)V", + r'setMaxRequestsPerHost', + r'(I)V', ); static final _setMaxRequestsPerHost = ProtectedJniExtensions.lookup< @@ -8448,7 +8451,7 @@ class Dispatcher extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int32,)>)>>("globalEnv_CallVoidMethod") + ffi.VarArgs<($Int32,)>)>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -8463,8 +8466,8 @@ class Dispatcher extends jni.JObject { } static final _id_getIdleCallback = _class.instanceMethodId( - r"getIdleCallback", - r"()Ljava/lang/Runnable;", + r'getIdleCallback', + r'()Ljava/lang/Runnable;', ); static final _getIdleCallback = ProtectedJniExtensions.lookup< @@ -8472,7 +8475,7 @@ class Dispatcher extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -8488,8 +8491,8 @@ class Dispatcher extends jni.JObject { } static final _id_setIdleCallback = _class.instanceMethodId( - r"setIdleCallback", - r"(Ljava/lang/Runnable;)V", + r'setIdleCallback', + r'(Ljava/lang/Runnable;)V', ); static final _setIdleCallback = ProtectedJniExtensions.lookup< @@ -8498,7 +8501,7 @@ class Dispatcher extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallVoidMethod") + 'globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -8513,8 +8516,8 @@ class Dispatcher extends jni.JObject { } static final _id_executorService = _class.instanceMethodId( - r"executorService", - r"()Ljava/util/concurrent/ExecutorService;", + r'executorService', + r'()Ljava/util/concurrent/ExecutorService;', ); static final _executorService = ProtectedJniExtensions.lookup< @@ -8522,7 +8525,7 @@ class Dispatcher extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -8531,14 +8534,14 @@ class Dispatcher extends jni.JObject { /// from: public final java.util.concurrent.ExecutorService executorService() /// The returned object must be released after use, by calling the [release] method. - jni.JObject executorService() { + ExecutorService executorService() { return _executorService( reference.pointer, _id_executorService as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + .object(const $ExecutorServiceType()); } static final _id_new1 = _class.constructorId( - r"(Ljava/util/concurrent/ExecutorService;)V", + r'(Ljava/util/concurrent/ExecutorService;)V', ); static final _new1 = ProtectedJniExtensions.lookup< @@ -8547,7 +8550,7 @@ class Dispatcher extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") + 'globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -8555,7 +8558,7 @@ class Dispatcher extends jni.JObject { /// from: public void (java.util.concurrent.ExecutorService executorService) /// The returned object must be released after use, by calling the [release] method. factory Dispatcher.new1( - jni.JObject executorService, + ExecutorService executorService, ) { return Dispatcher.fromReference(_new1(_class.reference.pointer, _id_new1 as jni.JMethodIDPtr, executorService.reference.pointer) @@ -8563,8 +8566,8 @@ class Dispatcher extends jni.JObject { } static final _id_cancelAll = _class.instanceMethodId( - r"cancelAll", - r"()V", + r'cancelAll', + r'()V', ); static final _cancelAll = ProtectedJniExtensions.lookup< @@ -8572,7 +8575,7 @@ class Dispatcher extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") + )>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -8585,8 +8588,8 @@ class Dispatcher extends jni.JObject { } static final _id_queuedCalls = _class.instanceMethodId( - r"queuedCalls", - r"()Ljava/util/List;", + r'queuedCalls', + r'()Ljava/util/List;', ); static final _queuedCalls = ProtectedJniExtensions.lookup< @@ -8594,7 +8597,7 @@ class Dispatcher extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -8609,8 +8612,8 @@ class Dispatcher extends jni.JObject { } static final _id_runningCalls = _class.instanceMethodId( - r"runningCalls", - r"()Ljava/util/List;", + r'runningCalls', + r'()Ljava/util/List;', ); static final _runningCalls = ProtectedJniExtensions.lookup< @@ -8618,7 +8621,7 @@ class Dispatcher extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -8634,8 +8637,8 @@ class Dispatcher extends jni.JObject { } static final _id_queuedCallsCount = _class.instanceMethodId( - r"queuedCallsCount", - r"()I", + r'queuedCallsCount', + r'()I', ); static final _queuedCallsCount = ProtectedJniExtensions.lookup< @@ -8643,7 +8646,7 @@ class Dispatcher extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -8658,8 +8661,8 @@ class Dispatcher extends jni.JObject { } static final _id_runningCallsCount = _class.instanceMethodId( - r"runningCallsCount", - r"()I", + r'runningCallsCount', + r'()I', ); static final _runningCallsCount = ProtectedJniExtensions.lookup< @@ -8667,7 +8670,7 @@ class Dispatcher extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -8686,7 +8689,7 @@ final class $DispatcherType extends jni.JObjType { const $DispatcherType(); @override - String get signature => r"Lokhttp3/Dispatcher;"; + String get signature => r'Lokhttp3/Dispatcher;'; @override Dispatcher fromReference(jni.JReference reference) => @@ -8707,6 +8710,317 @@ final class $DispatcherType extends jni.JObjType { } } +/// from: java.util.concurrent.ExecutorService +class ExecutorService extends jni.JObject { + @override + late final jni.JObjType $type = type; + + ExecutorService.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = + jni.JClass.forName(r'java/util/concurrent/ExecutorService'); + + /// The type which includes information such as the signature of this class. + static const type = $ExecutorServiceType(); + static final _id_shutdown = _class.instanceMethodId( + r'shutdown', + r'()V', + ); + + static final _shutdown = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallVoidMethod') + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract void shutdown() + void shutdown() { + _shutdown(reference.pointer, _id_shutdown as jni.JMethodIDPtr).check(); + } + + static final _id_shutdownNow = _class.instanceMethodId( + r'shutdownNow', + r'()Ljava/util/List;', + ); + + static final _shutdownNow = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract java.util.List shutdownNow() + /// The returned object must be released after use, by calling the [release] method. + jni.JList shutdownNow() { + return _shutdownNow(reference.pointer, _id_shutdownNow as jni.JMethodIDPtr) + .object(const jni.JListType(jni.JObjectType())); + } + + static final _id_isShutdown = _class.instanceMethodId( + r'isShutdown', + r'()Z', + ); + + static final _isShutdown = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallBooleanMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract boolean isShutdown() + bool isShutdown() { + return _isShutdown(reference.pointer, _id_isShutdown as jni.JMethodIDPtr) + .boolean; + } + + static final _id_isTerminated = _class.instanceMethodId( + r'isTerminated', + r'()Z', + ); + + static final _isTerminated = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallBooleanMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract boolean isTerminated() + bool isTerminated() { + return _isTerminated( + reference.pointer, _id_isTerminated as jni.JMethodIDPtr) + .boolean; + } + + static final _id_awaitTermination = _class.instanceMethodId( + r'awaitTermination', + r'(JLjava/util/concurrent/TimeUnit;)Z', + ); + + static final _awaitTermination = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( + 'globalEnv_CallBooleanMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, + ffi.Pointer)>(); + + /// from: public abstract boolean awaitTermination(long j, java.util.concurrent.TimeUnit timeUnit) + bool awaitTermination( + int j, + jni.JObject timeUnit, + ) { + return _awaitTermination( + reference.pointer, + _id_awaitTermination as jni.JMethodIDPtr, + j, + timeUnit.reference.pointer) + .boolean; + } + + /// Maps a specific port to the implemented interface. + static final Map _$impls = {}; + ReceivePort? _$p; + + static jni.JObjectPtr _$invoke( + int port, + jni.JObjectPtr descriptor, + jni.JObjectPtr args, + ) { + return _$invokeMethod( + port, + $MethodInvocation.fromAddresses( + 0, + descriptor.address, + args.address, + ), + ); + } + + static final ffi.Pointer< + ffi.NativeFunction< + jni.JObjectPtr Function( + ffi.Uint64, jni.JObjectPtr, jni.JObjectPtr)>> + _$invokePointer = ffi.Pointer.fromFunction(_$invoke); + + static ffi.Pointer _$invokeMethod( + int $p, + $MethodInvocation $i, + ) { + try { + final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); + final $a = $i.args; + if ($d == r'shutdown()V') { + _$impls[$p]!.shutdown(); + return jni.nullptr; + } + if ($d == r'shutdownNow()Ljava/util/List;') { + final $r = _$impls[$p]!.shutdownNow(); + return ($r as jni.JObject) + .castTo(const jni.JObjectType()) + .reference + .toPointer(); + } + if ($d == r'isShutdown()Z') { + final $r = _$impls[$p]!.isShutdown(); + return jni.JBoolean($r).reference.toPointer(); + } + if ($d == r'isTerminated()Z') { + final $r = _$impls[$p]!.isTerminated(); + return jni.JBoolean($r).reference.toPointer(); + } + if ($d == r'awaitTermination(JLjava/util/concurrent/TimeUnit;)Z') { + final $r = _$impls[$p]!.awaitTermination( + $a[0] + .castTo(const jni.JLongType(), releaseOriginal: true) + .longValue(releaseOriginal: true), + $a[1].castTo(const jni.JObjectType(), releaseOriginal: true), + ); + return jni.JBoolean($r).reference.toPointer(); + } + } catch (e) { + return ProtectedJniExtensions.newDartException(e); + } + return jni.nullptr; + } + + factory ExecutorService.implement( + $ExecutorServiceImpl $impl, + ) { + final $p = ReceivePort(); + final $x = ExecutorService.fromReference( + ProtectedJniExtensions.newPortProxy( + r'java.util.concurrent.ExecutorService', + $p, + _$invokePointer, + ), + ).._$p = $p; + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; + $p.listen(($m) { + if ($m == null) { + _$impls.remove($p.sendPort.nativePort); + $p.close(); + return; + } + final $i = $MethodInvocation.fromMessage($m as List); + final $r = _$invokeMethod($p.sendPort.nativePort, $i); + ProtectedJniExtensions.returnResult($i.result, $r); + }); + return $x; + } +} + +abstract interface class $ExecutorServiceImpl { + factory $ExecutorServiceImpl({ + required void Function() shutdown, + required jni.JList Function() shutdownNow, + required bool Function() isShutdown, + required bool Function() isTerminated, + required bool Function(int j, jni.JObject timeUnit) awaitTermination, + }) = _$ExecutorServiceImpl; + + void shutdown(); + jni.JList shutdownNow(); + bool isShutdown(); + bool isTerminated(); + bool awaitTermination(int j, jni.JObject timeUnit); +} + +class _$ExecutorServiceImpl implements $ExecutorServiceImpl { + _$ExecutorServiceImpl({ + required void Function() shutdown, + required jni.JList Function() shutdownNow, + required bool Function() isShutdown, + required bool Function() isTerminated, + required bool Function(int j, jni.JObject timeUnit) awaitTermination, + }) : _shutdown = shutdown, + _shutdownNow = shutdownNow, + _isShutdown = isShutdown, + _isTerminated = isTerminated, + _awaitTermination = awaitTermination; + + final void Function() _shutdown; + final jni.JList Function() _shutdownNow; + final bool Function() _isShutdown; + final bool Function() _isTerminated; + final bool Function(int j, jni.JObject timeUnit) _awaitTermination; + + void shutdown() { + return _shutdown(); + } + + jni.JList shutdownNow() { + return _shutdownNow(); + } + + bool isShutdown() { + return _isShutdown(); + } + + bool isTerminated() { + return _isTerminated(); + } + + bool awaitTermination(int j, jni.JObject timeUnit) { + return _awaitTermination(j, timeUnit); + } +} + +final class $ExecutorServiceType extends jni.JObjType { + const $ExecutorServiceType(); + + @override + String get signature => r'Ljava/util/concurrent/ExecutorService;'; + + @override + ExecutorService fromReference(jni.JReference reference) => + ExecutorService.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($ExecutorServiceType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($ExecutorServiceType) && + other is $ExecutorServiceType; + } +} + /// from: okhttp3.Cache$Companion class Cache_Companion extends jni.JObject { @override @@ -8716,13 +9030,13 @@ class Cache_Companion extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/Cache$Companion"); + static final _class = jni.JClass.forName(r'okhttp3/Cache$Companion'); /// The type which includes information such as the signature of this class. static const type = $Cache_CompanionType(); static final _id_key = _class.instanceMethodId( - r"key", - r"(Lokhttp3/HttpUrl;)Ljava/lang/String;", + r'key', + r'(Lokhttp3/HttpUrl;)Ljava/lang/String;', ); static final _key = ProtectedJniExtensions.lookup< @@ -8731,7 +9045,7 @@ class Cache_Companion extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -8747,8 +9061,8 @@ class Cache_Companion extends jni.JObject { } static final _id_varyMatches = _class.instanceMethodId( - r"varyMatches", - r"(Lokhttp3/Response;Lokhttp3/Headers;Lokhttp3/Request;)Z", + r'varyMatches', + r'(Lokhttp3/Response;Lokhttp3/Headers;Lokhttp3/Request;)Z', ); static final _varyMatches = ProtectedJniExtensions.lookup< @@ -8761,7 +9075,7 @@ class Cache_Companion extends jni.JObject { ffi.Pointer, ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallBooleanMethod") + )>)>>('globalEnv_CallBooleanMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -8786,8 +9100,8 @@ class Cache_Companion extends jni.JObject { } static final _id_hasVaryAll = _class.instanceMethodId( - r"hasVaryAll", - r"(Lokhttp3/Response;)Z", + r'hasVaryAll', + r'(Lokhttp3/Response;)Z', ); static final _hasVaryAll = ProtectedJniExtensions.lookup< @@ -8796,7 +9110,7 @@ class Cache_Companion extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallBooleanMethod") + 'globalEnv_CallBooleanMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -8811,8 +9125,8 @@ class Cache_Companion extends jni.JObject { } static final _id_varyHeaders = _class.instanceMethodId( - r"varyHeaders", - r"(Lokhttp3/Response;)Lokhttp3/Headers;", + r'varyHeaders', + r'(Lokhttp3/Response;)Lokhttp3/Headers;', ); static final _varyHeaders = ProtectedJniExtensions.lookup< @@ -8821,7 +9135,7 @@ class Cache_Companion extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -8837,7 +9151,7 @@ class Cache_Companion extends jni.JObject { } static final _id_new0 = _class.constructorId( - r"(Lkotlin/jvm/internal/DefaultConstructorMarker;)V", + r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -8846,7 +9160,7 @@ class Cache_Companion extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") + 'globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -8868,7 +9182,7 @@ final class $Cache_CompanionType extends jni.JObjType { const $Cache_CompanionType(); @override - String get signature => r"Lokhttp3/Cache$Companion;"; + String get signature => r'Lokhttp3/Cache$Companion;'; @override Cache_Companion fromReference(jni.JReference reference) => @@ -8899,12 +9213,12 @@ class Cache_Entry_Companion extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/Cache$Entry$Companion"); + static final _class = jni.JClass.forName(r'okhttp3/Cache$Entry$Companion'); /// The type which includes information such as the signature of this class. static const type = $Cache_Entry_CompanionType(); static final _id_new0 = _class.constructorId( - r"(Lkotlin/jvm/internal/DefaultConstructorMarker;)V", + r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -8913,7 +9227,7 @@ class Cache_Entry_Companion extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") + 'globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -8936,7 +9250,7 @@ final class $Cache_Entry_CompanionType const $Cache_Entry_CompanionType(); @override - String get signature => r"Lokhttp3/Cache$Entry$Companion;"; + String get signature => r'Lokhttp3/Cache$Entry$Companion;'; @override Cache_Entry_Companion fromReference(jni.JReference reference) => @@ -8967,13 +9281,13 @@ class Cache extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/Cache"); + static final _class = jni.JClass.forName(r'okhttp3/Cache'); /// The type which includes information such as the signature of this class. static const type = $CacheType(); static final _id_Companion = _class.staticFieldId( - r"Companion", - r"Lokhttp3/Cache$Companion;", + r'Companion', + r'Lokhttp3/Cache$Companion;', ); /// from: static public final okhttp3.Cache$Companion Companion @@ -8982,7 +9296,7 @@ class Cache extends jni.JObject { _id_Companion.get(_class, const $Cache_CompanionType()); static final _id_new0 = _class.constructorId( - r"(Ljava/io/File;JLokhttp3/internal/io/FileSystem;)V", + r'(Ljava/io/File;JLokhttp3/internal/io/FileSystem;)V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -8995,7 +9309,7 @@ class Cache extends jni.JObject { ffi.Pointer, ffi.Int64, ffi.Pointer - )>)>>("globalEnv_NewObject") + )>)>>('globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, int, ffi.Pointer)>(); @@ -9017,8 +9331,8 @@ class Cache extends jni.JObject { } static final _id_isClosed = _class.instanceMethodId( - r"isClosed", - r"()Z", + r'isClosed', + r'()Z', ); static final _isClosed = ProtectedJniExtensions.lookup< @@ -9026,7 +9340,7 @@ class Cache extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallBooleanMethod") + )>>('globalEnv_CallBooleanMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -9040,7 +9354,7 @@ class Cache extends jni.JObject { } static final _id_new1 = _class.constructorId( - r"(Ljava/io/File;J)V", + r'(Ljava/io/File;J)V', ); static final _new1 = ProtectedJniExtensions.lookup< @@ -9049,7 +9363,7 @@ class Cache extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer, ffi.Int64)>)>>( - "globalEnv_NewObject") + 'globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, int)>(); @@ -9066,8 +9380,8 @@ class Cache extends jni.JObject { } static final _id_initialize = _class.instanceMethodId( - r"initialize", - r"()V", + r'initialize', + r'()V', ); static final _initialize = ProtectedJniExtensions.lookup< @@ -9075,7 +9389,7 @@ class Cache extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") + )>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -9088,8 +9402,8 @@ class Cache extends jni.JObject { } static final _id_delete = _class.instanceMethodId( - r"delete", - r"()V", + r'delete', + r'()V', ); static final _delete = ProtectedJniExtensions.lookup< @@ -9097,7 +9411,7 @@ class Cache extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") + )>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -9110,8 +9424,8 @@ class Cache extends jni.JObject { } static final _id_evictAll = _class.instanceMethodId( - r"evictAll", - r"()V", + r'evictAll', + r'()V', ); static final _evictAll = ProtectedJniExtensions.lookup< @@ -9119,7 +9433,7 @@ class Cache extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") + )>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -9132,8 +9446,8 @@ class Cache extends jni.JObject { } static final _id_urls = _class.instanceMethodId( - r"urls", - r"()Ljava/util/Iterator;", + r'urls', + r'()Ljava/util/Iterator;', ); static final _urls = ProtectedJniExtensions.lookup< @@ -9141,7 +9455,7 @@ class Cache extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -9156,8 +9470,8 @@ class Cache extends jni.JObject { } static final _id_writeAbortCount = _class.instanceMethodId( - r"writeAbortCount", - r"()I", + r'writeAbortCount', + r'()I', ); static final _writeAbortCount = ProtectedJniExtensions.lookup< @@ -9165,7 +9479,7 @@ class Cache extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -9180,8 +9494,8 @@ class Cache extends jni.JObject { } static final _id_writeSuccessCount = _class.instanceMethodId( - r"writeSuccessCount", - r"()I", + r'writeSuccessCount', + r'()I', ); static final _writeSuccessCount = ProtectedJniExtensions.lookup< @@ -9189,7 +9503,7 @@ class Cache extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -9204,8 +9518,8 @@ class Cache extends jni.JObject { } static final _id_size = _class.instanceMethodId( - r"size", - r"()J", + r'size', + r'()J', ); static final _size = ProtectedJniExtensions.lookup< @@ -9213,7 +9527,7 @@ class Cache extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallLongMethod") + )>>('globalEnv_CallLongMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -9226,8 +9540,8 @@ class Cache extends jni.JObject { } static final _id_maxSize = _class.instanceMethodId( - r"maxSize", - r"()J", + r'maxSize', + r'()J', ); static final _maxSize = ProtectedJniExtensions.lookup< @@ -9235,7 +9549,7 @@ class Cache extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallLongMethod") + )>>('globalEnv_CallLongMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -9248,8 +9562,8 @@ class Cache extends jni.JObject { } static final _id_flush = _class.instanceMethodId( - r"flush", - r"()V", + r'flush', + r'()V', ); static final _flush = ProtectedJniExtensions.lookup< @@ -9257,7 +9571,7 @@ class Cache extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") + )>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -9270,8 +9584,8 @@ class Cache extends jni.JObject { } static final _id_close = _class.instanceMethodId( - r"close", - r"()V", + r'close', + r'()V', ); static final _close = ProtectedJniExtensions.lookup< @@ -9279,7 +9593,7 @@ class Cache extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") + )>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -9292,8 +9606,8 @@ class Cache extends jni.JObject { } static final _id_directory = _class.instanceMethodId( - r"directory", - r"()Ljava/io/File;", + r'directory', + r'()Ljava/io/File;', ); static final _directory = ProtectedJniExtensions.lookup< @@ -9301,7 +9615,7 @@ class Cache extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -9316,8 +9630,8 @@ class Cache extends jni.JObject { } static final _id_networkCount = _class.instanceMethodId( - r"networkCount", - r"()I", + r'networkCount', + r'()I', ); static final _networkCount = ProtectedJniExtensions.lookup< @@ -9325,7 +9639,7 @@ class Cache extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -9340,8 +9654,8 @@ class Cache extends jni.JObject { } static final _id_hitCount = _class.instanceMethodId( - r"hitCount", - r"()I", + r'hitCount', + r'()I', ); static final _hitCount = ProtectedJniExtensions.lookup< @@ -9349,7 +9663,7 @@ class Cache extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -9363,8 +9677,8 @@ class Cache extends jni.JObject { } static final _id_requestCount = _class.instanceMethodId( - r"requestCount", - r"()I", + r'requestCount', + r'()I', ); static final _requestCount = ProtectedJniExtensions.lookup< @@ -9372,7 +9686,7 @@ class Cache extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -9387,8 +9701,8 @@ class Cache extends jni.JObject { } static final _id_key = _class.staticMethodId( - r"key", - r"(Lokhttp3/HttpUrl;)Ljava/lang/String;", + r'key', + r'(Lokhttp3/HttpUrl;)Ljava/lang/String;', ); static final _key = ProtectedJniExtensions.lookup< @@ -9397,7 +9711,7 @@ class Cache extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallStaticObjectMethod") + 'globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -9417,7 +9731,7 @@ final class $CacheType extends jni.JObjType { const $CacheType(); @override - String get signature => r"Lokhttp3/Cache;"; + String get signature => r'Lokhttp3/Cache;'; @override Cache fromReference(jni.JReference reference) => @@ -9448,13 +9762,13 @@ class RedirectReceivedCallback extends jni.JObject { ) : super.fromReference(reference); static final _class = - jni.JClass.forName(r"com/example/ok_http/RedirectReceivedCallback"); + jni.JClass.forName(r'com/example/ok_http/RedirectReceivedCallback'); /// The type which includes information such as the signature of this class. static const type = $RedirectReceivedCallbackType(); static final _id_onRedirectReceived = _class.instanceMethodId( - r"onRedirectReceived", - r"(Lokhttp3/Response;Ljava/lang/String;)V", + r'onRedirectReceived', + r'(Lokhttp3/Response;Ljava/lang/String;)V', ); static final _onRedirectReceived = ProtectedJniExtensions.lookup< @@ -9466,7 +9780,7 @@ class RedirectReceivedCallback extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallVoidMethod") + )>)>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -9516,7 +9830,7 @@ class RedirectReceivedCallback extends jni.JObject { try { final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); final $a = $i.args; - if ($d == r"onRedirectReceived(Lokhttp3/Response;Ljava/lang/String;)V") { + if ($d == r'onRedirectReceived(Lokhttp3/Response;Ljava/lang/String;)V') { _$impls[$p]!.onRedirectReceived( $a[0].castTo(const $ResponseType(), releaseOriginal: true), $a[1].castTo(const jni.JStringType(), releaseOriginal: true), @@ -9524,7 +9838,7 @@ class RedirectReceivedCallback extends jni.JObject { return jni.nullptr; } } catch (e) { - return ProtectedJniExtensions.newDartException(e.toString()); + return ProtectedJniExtensions.newDartException(e); } return jni.nullptr; } @@ -9535,7 +9849,7 @@ class RedirectReceivedCallback extends jni.JObject { final $p = ReceivePort(); final $x = RedirectReceivedCallback.fromReference( ProtectedJniExtensions.newPortProxy( - r"com.example.ok_http.RedirectReceivedCallback", + r'com.example.ok_http.RedirectReceivedCallback', $p, _$invokePointer, ), @@ -9584,7 +9898,7 @@ final class $RedirectReceivedCallbackType const $RedirectReceivedCallbackType(); @override - String get signature => r"Lcom/example/ok_http/RedirectReceivedCallback;"; + String get signature => r'Lcom/example/ok_http/RedirectReceivedCallback;'; @override RedirectReceivedCallback fromReference(jni.JReference reference) => @@ -9616,13 +9930,13 @@ class RedirectInterceptor_Companion extends jni.JObject { ) : super.fromReference(reference); static final _class = - jni.JClass.forName(r"com/example/ok_http/RedirectInterceptor$Companion"); + jni.JClass.forName(r'com/example/ok_http/RedirectInterceptor$Companion'); /// The type which includes information such as the signature of this class. static const type = $RedirectInterceptor_CompanionType(); static final _id_addRedirectInterceptor = _class.instanceMethodId( - r"addRedirectInterceptor", - r"(Lokhttp3/OkHttpClient$Builder;IZLcom/example/ok_http/RedirectReceivedCallback;)Lokhttp3/OkHttpClient$Builder;", + r'addRedirectInterceptor', + r'(Lokhttp3/OkHttpClient$Builder;IZLcom/example/ok_http/RedirectReceivedCallback;)Lokhttp3/OkHttpClient$Builder;', ); static final _addRedirectInterceptor = ProtectedJniExtensions.lookup< @@ -9633,10 +9947,10 @@ class RedirectInterceptor_Companion extends jni.JObject { ffi.VarArgs< ( ffi.Pointer, - ffi.Int32, - ffi.Uint8, + $Int32, + $Int32, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, int, int, ffi.Pointer)>(); @@ -9660,7 +9974,7 @@ class RedirectInterceptor_Companion extends jni.JObject { } static final _id_new0 = _class.constructorId( - r"(Lkotlin/jvm/internal/DefaultConstructorMarker;)V", + r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -9669,7 +9983,7 @@ class RedirectInterceptor_Companion extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") + 'globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -9693,7 +10007,7 @@ final class $RedirectInterceptor_CompanionType @override String get signature => - r"Lcom/example/ok_http/RedirectInterceptor$Companion;"; + r'Lcom/example/ok_http/RedirectInterceptor$Companion;'; @override RedirectInterceptor_Companion fromReference(jni.JReference reference) => @@ -9725,13 +10039,13 @@ class RedirectInterceptor extends jni.JObject { ) : super.fromReference(reference); static final _class = - jni.JClass.forName(r"com/example/ok_http/RedirectInterceptor"); + jni.JClass.forName(r'com/example/ok_http/RedirectInterceptor'); /// The type which includes information such as the signature of this class. static const type = $RedirectInterceptorType(); static final _id_Companion = _class.staticFieldId( - r"Companion", - r"Lcom/example/ok_http/RedirectInterceptor$Companion;", + r'Companion', + r'Lcom/example/ok_http/RedirectInterceptor$Companion;', ); /// from: static public final com.example.ok_http.RedirectInterceptor$Companion Companion @@ -9740,7 +10054,7 @@ class RedirectInterceptor extends jni.JObject { _id_Companion.get(_class, const $RedirectInterceptor_CompanionType()); static final _id_new0 = _class.constructorId( - r"()V", + r'()V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -9748,7 +10062,7 @@ class RedirectInterceptor extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_NewObject") + )>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -9768,7 +10082,7 @@ final class $RedirectInterceptorType extends jni.JObjType { const $RedirectInterceptorType(); @override - String get signature => r"Lcom/example/ok_http/RedirectInterceptor;"; + String get signature => r'Lcom/example/ok_http/RedirectInterceptor;'; @override RedirectInterceptor fromReference(jni.JReference reference) => @@ -9800,12 +10114,12 @@ class AsyncInputStreamReader extends jni.JObject { ) : super.fromReference(reference); static final _class = - jni.JClass.forName(r"com/example/ok_http/AsyncInputStreamReader"); + jni.JClass.forName(r'com/example/ok_http/AsyncInputStreamReader'); /// The type which includes information such as the signature of this class. static const type = $AsyncInputStreamReaderType(); static final _id_new0 = _class.constructorId( - r"()V", + r'()V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -9813,7 +10127,7 @@ class AsyncInputStreamReader extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_NewObject") + )>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -9829,8 +10143,8 @@ class AsyncInputStreamReader extends jni.JObject { } static final _id_readAsync = _class.instanceMethodId( - r"readAsync", - r"(Ljava/io/InputStream;Lcom/example/ok_http/DataCallback;)Ljava/util/concurrent/Future;", + r'readAsync', + r'(Ljava/io/InputStream;Lcom/example/ok_http/DataCallback;)Ljava/util/concurrent/Future;', ); static final _readAsync = ProtectedJniExtensions.lookup< @@ -9842,7 +10156,7 @@ class AsyncInputStreamReader extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -9859,8 +10173,8 @@ class AsyncInputStreamReader extends jni.JObject { } static final _id_shutdown = _class.instanceMethodId( - r"shutdown", - r"()V", + r'shutdown', + r'()V', ); static final _shutdown = ProtectedJniExtensions.lookup< @@ -9868,7 +10182,7 @@ class AsyncInputStreamReader extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") + )>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -9886,7 +10200,7 @@ final class $AsyncInputStreamReaderType const $AsyncInputStreamReaderType(); @override - String get signature => r"Lcom/example/ok_http/AsyncInputStreamReader;"; + String get signature => r'Lcom/example/ok_http/AsyncInputStreamReader;'; @override AsyncInputStreamReader fromReference(jni.JReference reference) => @@ -9917,13 +10231,13 @@ class DataCallback extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"com/example/ok_http/DataCallback"); + static final _class = jni.JClass.forName(r'com/example/ok_http/DataCallback'); /// The type which includes information such as the signature of this class. static const type = $DataCallbackType(); static final _id_onDataRead = _class.instanceMethodId( - r"onDataRead", - r"([B)V", + r'onDataRead', + r'([B)V', ); static final _onDataRead = ProtectedJniExtensions.lookup< @@ -9932,7 +10246,7 @@ class DataCallback extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallVoidMethod") + 'globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -9947,8 +10261,8 @@ class DataCallback extends jni.JObject { } static final _id_onFinished = _class.instanceMethodId( - r"onFinished", - r"()V", + r'onFinished', + r'()V', ); static final _onFinished = ProtectedJniExtensions.lookup< @@ -9956,7 +10270,7 @@ class DataCallback extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") + )>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -9969,8 +10283,8 @@ class DataCallback extends jni.JObject { } static final _id_onError = _class.instanceMethodId( - r"onError", - r"(Ljava/io/IOException;)V", + r'onError', + r'(Ljava/io/IOException;)V', ); static final _onError = ProtectedJniExtensions.lookup< @@ -9979,7 +10293,7 @@ class DataCallback extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallVoidMethod") + 'globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -10025,25 +10339,25 @@ class DataCallback extends jni.JObject { try { final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); final $a = $i.args; - if ($d == r"onDataRead([B)V") { + if ($d == r'onDataRead([B)V') { _$impls[$p]!.onDataRead( $a[0].castTo(const jni.JArrayType(jni.jbyteType()), releaseOriginal: true), ); return jni.nullptr; } - if ($d == r"onFinished()V") { + if ($d == r'onFinished()V') { _$impls[$p]!.onFinished(); return jni.nullptr; } - if ($d == r"onError(Ljava/io/IOException;)V") { + if ($d == r'onError(Ljava/io/IOException;)V') { _$impls[$p]!.onError( $a[0].castTo(const jni.JObjectType(), releaseOriginal: true), ); return jni.nullptr; } } catch (e) { - return ProtectedJniExtensions.newDartException(e.toString()); + return ProtectedJniExtensions.newDartException(e); } return jni.nullptr; } @@ -10054,7 +10368,7 @@ class DataCallback extends jni.JObject { final $p = ReceivePort(); final $x = DataCallback.fromReference( ProtectedJniExtensions.newPortProxy( - r"com.example.ok_http.DataCallback", + r'com.example.ok_http.DataCallback', $p, _$invokePointer, ), @@ -10117,7 +10431,7 @@ final class $DataCallbackType extends jni.JObjType { const $DataCallbackType(); @override - String get signature => r"Lcom/example/ok_http/DataCallback;"; + String get signature => r'Lcom/example/ok_http/DataCallback;'; @override DataCallback fromReference(jni.JReference reference) => @@ -10138,3 +10452,2944 @@ final class $DataCallbackType extends jni.JObjType { other is $DataCallbackType; } } + +/// from: okhttp3.WebSocket$Factory +class WebSocket_Factory extends jni.JObject { + @override + late final jni.JObjType $type = type; + + WebSocket_Factory.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r'okhttp3/WebSocket$Factory'); + + /// The type which includes information such as the signature of this class. + static const type = $WebSocket_FactoryType(); + static final _id_newWebSocket = _class.instanceMethodId( + r'newWebSocket', + r'(Lokhttp3/Request;Lokhttp3/WebSocketListener;)Lokhttp3/WebSocket;', + ); + + static final _newWebSocket = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public abstract okhttp3.WebSocket newWebSocket(okhttp3.Request request, okhttp3.WebSocketListener webSocketListener) + /// The returned object must be released after use, by calling the [release] method. + WebSocket newWebSocket( + Request request, + jni.JObject webSocketListener, + ) { + return _newWebSocket( + reference.pointer, + _id_newWebSocket as jni.JMethodIDPtr, + request.reference.pointer, + webSocketListener.reference.pointer) + .object(const $WebSocketType()); + } + + /// Maps a specific port to the implemented interface. + static final Map _$impls = {}; + ReceivePort? _$p; + + static jni.JObjectPtr _$invoke( + int port, + jni.JObjectPtr descriptor, + jni.JObjectPtr args, + ) { + return _$invokeMethod( + port, + $MethodInvocation.fromAddresses( + 0, + descriptor.address, + args.address, + ), + ); + } + + static final ffi.Pointer< + ffi.NativeFunction< + jni.JObjectPtr Function( + ffi.Uint64, jni.JObjectPtr, jni.JObjectPtr)>> + _$invokePointer = ffi.Pointer.fromFunction(_$invoke); + + static ffi.Pointer _$invokeMethod( + int $p, + $MethodInvocation $i, + ) { + try { + final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); + final $a = $i.args; + if ($d == + r'newWebSocket(Lokhttp3/Request;Lokhttp3/WebSocketListener;)Lokhttp3/WebSocket;') { + final $r = _$impls[$p]!.newWebSocket( + $a[0].castTo(const $RequestType(), releaseOriginal: true), + $a[1].castTo(const jni.JObjectType(), releaseOriginal: true), + ); + return ($r as jni.JObject) + .castTo(const jni.JObjectType()) + .reference + .toPointer(); + } + } catch (e) { + return ProtectedJniExtensions.newDartException(e); + } + return jni.nullptr; + } + + factory WebSocket_Factory.implement( + $WebSocket_FactoryImpl $impl, + ) { + final $p = ReceivePort(); + final $x = WebSocket_Factory.fromReference( + ProtectedJniExtensions.newPortProxy( + r'okhttp3.WebSocket$Factory', + $p, + _$invokePointer, + ), + ).._$p = $p; + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; + $p.listen(($m) { + if ($m == null) { + _$impls.remove($p.sendPort.nativePort); + $p.close(); + return; + } + final $i = $MethodInvocation.fromMessage($m as List); + final $r = _$invokeMethod($p.sendPort.nativePort, $i); + ProtectedJniExtensions.returnResult($i.result, $r); + }); + return $x; + } +} + +abstract interface class $WebSocket_FactoryImpl { + factory $WebSocket_FactoryImpl({ + required WebSocket Function(Request request, jni.JObject webSocketListener) + newWebSocket, + }) = _$WebSocket_FactoryImpl; + + WebSocket newWebSocket(Request request, jni.JObject webSocketListener); +} + +class _$WebSocket_FactoryImpl implements $WebSocket_FactoryImpl { + _$WebSocket_FactoryImpl({ + required WebSocket Function(Request request, jni.JObject webSocketListener) + newWebSocket, + }) : _newWebSocket = newWebSocket; + + final WebSocket Function(Request request, jni.JObject webSocketListener) + _newWebSocket; + + WebSocket newWebSocket(Request request, jni.JObject webSocketListener) { + return _newWebSocket(request, webSocketListener); + } +} + +final class $WebSocket_FactoryType extends jni.JObjType { + const $WebSocket_FactoryType(); + + @override + String get signature => r'Lokhttp3/WebSocket$Factory;'; + + @override + WebSocket_Factory fromReference(jni.JReference reference) => + WebSocket_Factory.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($WebSocket_FactoryType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($WebSocket_FactoryType) && + other is $WebSocket_FactoryType; + } +} + +/// from: okhttp3.WebSocket +class WebSocket extends jni.JObject { + @override + late final jni.JObjType $type = type; + + WebSocket.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r'okhttp3/WebSocket'); + + /// The type which includes information such as the signature of this class. + static const type = $WebSocketType(); + static final _id_request = _class.instanceMethodId( + r'request', + r'()Lokhttp3/Request;', + ); + + static final _request = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract okhttp3.Request request() + /// The returned object must be released after use, by calling the [release] method. + Request request() { + return _request(reference.pointer, _id_request as jni.JMethodIDPtr) + .object(const $RequestType()); + } + + static final _id_queueSize = _class.instanceMethodId( + r'queueSize', + r'()J', + ); + + static final _queueSize = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallLongMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract long queueSize() + int queueSize() { + return _queueSize(reference.pointer, _id_queueSize as jni.JMethodIDPtr) + .long; + } + + static final _id_send = _class.instanceMethodId( + r'send', + r'(Ljava/lang/String;)Z', + ); + + static final _send = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallBooleanMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public abstract boolean send(java.lang.String string) + bool send( + jni.JString string, + ) { + return _send(reference.pointer, _id_send as jni.JMethodIDPtr, + string.reference.pointer) + .boolean; + } + + static final _id_send1 = _class.instanceMethodId( + r'send', + r'(Lokio/ByteString;)Z', + ); + + static final _send1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallBooleanMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public abstract boolean send(okio.ByteString byteString) + bool send1( + ByteString byteString, + ) { + return _send1(reference.pointer, _id_send1 as jni.JMethodIDPtr, + byteString.reference.pointer) + .boolean; + } + + static final _id_close = _class.instanceMethodId( + r'close', + r'(ILjava/lang/String;)Z', + ); + + static final _close = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<($Int32, ffi.Pointer)>)>>( + 'globalEnv_CallBooleanMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, + ffi.Pointer)>(); + + /// from: public abstract boolean close(int i, java.lang.String string) + bool close( + int i, + jni.JString string, + ) { + return _close(reference.pointer, _id_close as jni.JMethodIDPtr, i, + string.reference.pointer) + .boolean; + } + + static final _id_cancel = _class.instanceMethodId( + r'cancel', + r'()V', + ); + + static final _cancel = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallVoidMethod') + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract void cancel() + void cancel() { + _cancel(reference.pointer, _id_cancel as jni.JMethodIDPtr).check(); + } + + /// Maps a specific port to the implemented interface. + static final Map _$impls = {}; + ReceivePort? _$p; + + static jni.JObjectPtr _$invoke( + int port, + jni.JObjectPtr descriptor, + jni.JObjectPtr args, + ) { + return _$invokeMethod( + port, + $MethodInvocation.fromAddresses( + 0, + descriptor.address, + args.address, + ), + ); + } + + static final ffi.Pointer< + ffi.NativeFunction< + jni.JObjectPtr Function( + ffi.Uint64, jni.JObjectPtr, jni.JObjectPtr)>> + _$invokePointer = ffi.Pointer.fromFunction(_$invoke); + + static ffi.Pointer _$invokeMethod( + int $p, + $MethodInvocation $i, + ) { + try { + final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); + final $a = $i.args; + if ($d == r'request()Lokhttp3/Request;') { + final $r = _$impls[$p]!.request(); + return ($r as jni.JObject) + .castTo(const jni.JObjectType()) + .reference + .toPointer(); + } + if ($d == r'queueSize()J') { + final $r = _$impls[$p]!.queueSize(); + return jni.JLong($r).reference.toPointer(); + } + if ($d == r'send(Ljava/lang/String;)Z') { + final $r = _$impls[$p]!.send( + $a[0].castTo(const jni.JStringType(), releaseOriginal: true), + ); + return jni.JBoolean($r).reference.toPointer(); + } + if ($d == r'send(Lokio/ByteString;)Z') { + final $r = _$impls[$p]!.send1( + $a[0].castTo(const $ByteStringType(), releaseOriginal: true), + ); + return jni.JBoolean($r).reference.toPointer(); + } + if ($d == r'close(ILjava/lang/String;)Z') { + final $r = _$impls[$p]!.close( + $a[0] + .castTo(const jni.JIntegerType(), releaseOriginal: true) + .intValue(releaseOriginal: true), + $a[1].castTo(const jni.JStringType(), releaseOriginal: true), + ); + return jni.JBoolean($r).reference.toPointer(); + } + if ($d == r'cancel()V') { + _$impls[$p]!.cancel(); + return jni.nullptr; + } + } catch (e) { + return ProtectedJniExtensions.newDartException(e); + } + return jni.nullptr; + } + + factory WebSocket.implement( + $WebSocketImpl $impl, + ) { + final $p = ReceivePort(); + final $x = WebSocket.fromReference( + ProtectedJniExtensions.newPortProxy( + r'okhttp3.WebSocket', + $p, + _$invokePointer, + ), + ).._$p = $p; + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; + $p.listen(($m) { + if ($m == null) { + _$impls.remove($p.sendPort.nativePort); + $p.close(); + return; + } + final $i = $MethodInvocation.fromMessage($m as List); + final $r = _$invokeMethod($p.sendPort.nativePort, $i); + ProtectedJniExtensions.returnResult($i.result, $r); + }); + return $x; + } +} + +abstract interface class $WebSocketImpl { + factory $WebSocketImpl({ + required Request Function() request, + required int Function() queueSize, + required bool Function(jni.JString string) send, + required bool Function(ByteString byteString) send1, + required bool Function(int i, jni.JString string) close, + required void Function() cancel, + }) = _$WebSocketImpl; + + Request request(); + int queueSize(); + bool send(jni.JString string); + bool send1(ByteString byteString); + bool close(int i, jni.JString string); + void cancel(); +} + +class _$WebSocketImpl implements $WebSocketImpl { + _$WebSocketImpl({ + required Request Function() request, + required int Function() queueSize, + required bool Function(jni.JString string) send, + required bool Function(ByteString byteString) send1, + required bool Function(int i, jni.JString string) close, + required void Function() cancel, + }) : _request = request, + _queueSize = queueSize, + _send = send, + _send1 = send1, + _close = close, + _cancel = cancel; + + final Request Function() _request; + final int Function() _queueSize; + final bool Function(jni.JString string) _send; + final bool Function(ByteString byteString) _send1; + final bool Function(int i, jni.JString string) _close; + final void Function() _cancel; + + Request request() { + return _request(); + } + + int queueSize() { + return _queueSize(); + } + + bool send(jni.JString string) { + return _send(string); + } + + bool send1(ByteString byteString) { + return _send1(byteString); + } + + bool close(int i, jni.JString string) { + return _close(i, string); + } + + void cancel() { + return _cancel(); + } +} + +final class $WebSocketType extends jni.JObjType { + const $WebSocketType(); + + @override + String get signature => r'Lokhttp3/WebSocket;'; + + @override + WebSocket fromReference(jni.JReference reference) => + WebSocket.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($WebSocketType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($WebSocketType) && other is $WebSocketType; + } +} + +/// from: com.example.ok_http.WebSocketListenerProxy$WebSocketListener +class WebSocketListenerProxy_WebSocketListener extends jni.JObject { + @override + late final jni.JObjType $type = + type; + + WebSocketListenerProxy_WebSocketListener.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName( + r'com/example/ok_http/WebSocketListenerProxy$WebSocketListener'); + + /// The type which includes information such as the signature of this class. + static const type = $WebSocketListenerProxy_WebSocketListenerType(); + static final _id_onOpen = _class.instanceMethodId( + r'onOpen', + r'(Lokhttp3/WebSocket;Lokhttp3/Response;)V', + ); + + static final _onOpen = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public abstract void onOpen(okhttp3.WebSocket webSocket, okhttp3.Response response) + void onOpen( + WebSocket webSocket, + Response response, + ) { + _onOpen(reference.pointer, _id_onOpen as jni.JMethodIDPtr, + webSocket.reference.pointer, response.reference.pointer) + .check(); + } + + static final _id_onMessage = _class.instanceMethodId( + r'onMessage', + r'(Lokhttp3/WebSocket;Ljava/lang/String;)V', + ); + + static final _onMessage = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public abstract void onMessage(okhttp3.WebSocket webSocket, java.lang.String string) + void onMessage( + WebSocket webSocket, + jni.JString string, + ) { + _onMessage(reference.pointer, _id_onMessage as jni.JMethodIDPtr, + webSocket.reference.pointer, string.reference.pointer) + .check(); + } + + static final _id_onMessage1 = _class.instanceMethodId( + r'onMessage', + r'(Lokhttp3/WebSocket;Lokio/ByteString;)V', + ); + + static final _onMessage1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public abstract void onMessage(okhttp3.WebSocket webSocket, okio.ByteString byteString) + void onMessage1( + WebSocket webSocket, + ByteString byteString, + ) { + _onMessage1(reference.pointer, _id_onMessage1 as jni.JMethodIDPtr, + webSocket.reference.pointer, byteString.reference.pointer) + .check(); + } + + static final _id_onClosing = _class.instanceMethodId( + r'onClosing', + r'(Lokhttp3/WebSocket;ILjava/lang/String;)V', + ); + + static final _onClosing = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + $Int32, + ffi.Pointer + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int, ffi.Pointer)>(); + + /// from: public abstract void onClosing(okhttp3.WebSocket webSocket, int i, java.lang.String string) + void onClosing( + WebSocket webSocket, + int i, + jni.JString string, + ) { + _onClosing(reference.pointer, _id_onClosing as jni.JMethodIDPtr, + webSocket.reference.pointer, i, string.reference.pointer) + .check(); + } + + static final _id_onFailure = _class.instanceMethodId( + r'onFailure', + r'(Lokhttp3/WebSocket;Ljava/lang/Throwable;Lokhttp3/Response;)V', + ); + + static final _onFailure = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + /// from: public abstract void onFailure(okhttp3.WebSocket webSocket, java.lang.Throwable throwable, okhttp3.Response response) + void onFailure( + WebSocket webSocket, + jni.JObject throwable, + Response response, + ) { + _onFailure( + reference.pointer, + _id_onFailure as jni.JMethodIDPtr, + webSocket.reference.pointer, + throwable.reference.pointer, + response.reference.pointer) + .check(); + } + + /// Maps a specific port to the implemented interface. + static final Map _$impls = + {}; + ReceivePort? _$p; + + static jni.JObjectPtr _$invoke( + int port, + jni.JObjectPtr descriptor, + jni.JObjectPtr args, + ) { + return _$invokeMethod( + port, + $MethodInvocation.fromAddresses( + 0, + descriptor.address, + args.address, + ), + ); + } + + static final ffi.Pointer< + ffi.NativeFunction< + jni.JObjectPtr Function( + ffi.Uint64, jni.JObjectPtr, jni.JObjectPtr)>> + _$invokePointer = ffi.Pointer.fromFunction(_$invoke); + + static ffi.Pointer _$invokeMethod( + int $p, + $MethodInvocation $i, + ) { + try { + final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); + final $a = $i.args; + if ($d == r'onOpen(Lokhttp3/WebSocket;Lokhttp3/Response;)V') { + _$impls[$p]!.onOpen( + $a[0].castTo(const $WebSocketType(), releaseOriginal: true), + $a[1].castTo(const $ResponseType(), releaseOriginal: true), + ); + return jni.nullptr; + } + if ($d == r'onMessage(Lokhttp3/WebSocket;Ljava/lang/String;)V') { + _$impls[$p]!.onMessage( + $a[0].castTo(const $WebSocketType(), releaseOriginal: true), + $a[1].castTo(const jni.JStringType(), releaseOriginal: true), + ); + return jni.nullptr; + } + if ($d == r'onMessage(Lokhttp3/WebSocket;Lokio/ByteString;)V') { + _$impls[$p]!.onMessage1( + $a[0].castTo(const $WebSocketType(), releaseOriginal: true), + $a[1].castTo(const $ByteStringType(), releaseOriginal: true), + ); + return jni.nullptr; + } + if ($d == r'onClosing(Lokhttp3/WebSocket;ILjava/lang/String;)V') { + _$impls[$p]!.onClosing( + $a[0].castTo(const $WebSocketType(), releaseOriginal: true), + $a[1] + .castTo(const jni.JIntegerType(), releaseOriginal: true) + .intValue(releaseOriginal: true), + $a[2].castTo(const jni.JStringType(), releaseOriginal: true), + ); + return jni.nullptr; + } + if ($d == + r'onFailure(Lokhttp3/WebSocket;Ljava/lang/Throwable;Lokhttp3/Response;)V') { + _$impls[$p]!.onFailure( + $a[0].castTo(const $WebSocketType(), releaseOriginal: true), + $a[1].castTo(const jni.JObjectType(), releaseOriginal: true), + $a[2].castTo(const $ResponseType(), releaseOriginal: true), + ); + return jni.nullptr; + } + } catch (e) { + return ProtectedJniExtensions.newDartException(e); + } + return jni.nullptr; + } + + factory WebSocketListenerProxy_WebSocketListener.implement( + $WebSocketListenerProxy_WebSocketListenerImpl $impl, + ) { + final $p = ReceivePort(); + final $x = WebSocketListenerProxy_WebSocketListener.fromReference( + ProtectedJniExtensions.newPortProxy( + r'com.example.ok_http.WebSocketListenerProxy$WebSocketListener', + $p, + _$invokePointer, + ), + ).._$p = $p; + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; + $p.listen(($m) { + if ($m == null) { + _$impls.remove($p.sendPort.nativePort); + $p.close(); + return; + } + final $i = $MethodInvocation.fromMessage($m as List); + final $r = _$invokeMethod($p.sendPort.nativePort, $i); + ProtectedJniExtensions.returnResult($i.result, $r); + }); + return $x; + } +} + +abstract interface class $WebSocketListenerProxy_WebSocketListenerImpl { + factory $WebSocketListenerProxy_WebSocketListenerImpl({ + required void Function(WebSocket webSocket, Response response) onOpen, + required void Function(WebSocket webSocket, jni.JString string) onMessage, + required void Function(WebSocket webSocket, ByteString byteString) + onMessage1, + required void Function(WebSocket webSocket, int i, jni.JString string) + onClosing, + required void Function( + WebSocket webSocket, jni.JObject throwable, Response response) + onFailure, + }) = _$WebSocketListenerProxy_WebSocketListenerImpl; + + void onOpen(WebSocket webSocket, Response response); + void onMessage(WebSocket webSocket, jni.JString string); + void onMessage1(WebSocket webSocket, ByteString byteString); + void onClosing(WebSocket webSocket, int i, jni.JString string); + void onFailure(WebSocket webSocket, jni.JObject throwable, Response response); +} + +class _$WebSocketListenerProxy_WebSocketListenerImpl + implements $WebSocketListenerProxy_WebSocketListenerImpl { + _$WebSocketListenerProxy_WebSocketListenerImpl({ + required void Function(WebSocket webSocket, Response response) onOpen, + required void Function(WebSocket webSocket, jni.JString string) onMessage, + required void Function(WebSocket webSocket, ByteString byteString) + onMessage1, + required void Function(WebSocket webSocket, int i, jni.JString string) + onClosing, + required void Function( + WebSocket webSocket, jni.JObject throwable, Response response) + onFailure, + }) : _onOpen = onOpen, + _onMessage = onMessage, + _onMessage1 = onMessage1, + _onClosing = onClosing, + _onFailure = onFailure; + + final void Function(WebSocket webSocket, Response response) _onOpen; + final void Function(WebSocket webSocket, jni.JString string) _onMessage; + final void Function(WebSocket webSocket, ByteString byteString) _onMessage1; + final void Function(WebSocket webSocket, int i, jni.JString string) + _onClosing; + final void Function( + WebSocket webSocket, jni.JObject throwable, Response response) _onFailure; + + void onOpen(WebSocket webSocket, Response response) { + return _onOpen(webSocket, response); + } + + void onMessage(WebSocket webSocket, jni.JString string) { + return _onMessage(webSocket, string); + } + + void onMessage1(WebSocket webSocket, ByteString byteString) { + return _onMessage1(webSocket, byteString); + } + + void onClosing(WebSocket webSocket, int i, jni.JString string) { + return _onClosing(webSocket, i, string); + } + + void onFailure( + WebSocket webSocket, jni.JObject throwable, Response response) { + return _onFailure(webSocket, throwable, response); + } +} + +final class $WebSocketListenerProxy_WebSocketListenerType + extends jni.JObjType { + const $WebSocketListenerProxy_WebSocketListenerType(); + + @override + String get signature => + r'Lcom/example/ok_http/WebSocketListenerProxy$WebSocketListener;'; + + @override + WebSocketListenerProxy_WebSocketListener fromReference( + jni.JReference reference) => + WebSocketListenerProxy_WebSocketListener.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($WebSocketListenerProxy_WebSocketListenerType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == + ($WebSocketListenerProxy_WebSocketListenerType) && + other is $WebSocketListenerProxy_WebSocketListenerType; + } +} + +/// from: com.example.ok_http.WebSocketListenerProxy +class WebSocketListenerProxy extends jni.JObject { + @override + late final jni.JObjType $type = type; + + WebSocketListenerProxy.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = + jni.JClass.forName(r'com/example/ok_http/WebSocketListenerProxy'); + + /// The type which includes information such as the signature of this class. + static const type = $WebSocketListenerProxyType(); + static final _id_new0 = _class.constructorId( + r'(Lcom/example/ok_http/WebSocketListenerProxy$WebSocketListener;)V', + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_NewObject') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public void (com.example.ok_http.WebSocketListenerProxy$WebSocketListener webSocketListener) + /// The returned object must be released after use, by calling the [release] method. + factory WebSocketListenerProxy( + WebSocketListenerProxy_WebSocketListener webSocketListener, + ) { + return WebSocketListenerProxy.fromReference(_new0(_class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, webSocketListener.reference.pointer) + .reference); + } + + static final _id_onOpen = _class.instanceMethodId( + r'onOpen', + r'(Lokhttp3/WebSocket;Lokhttp3/Response;)V', + ); + + static final _onOpen = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public void onOpen(okhttp3.WebSocket webSocket, okhttp3.Response response) + void onOpen( + WebSocket webSocket, + Response response, + ) { + _onOpen(reference.pointer, _id_onOpen as jni.JMethodIDPtr, + webSocket.reference.pointer, response.reference.pointer) + .check(); + } + + static final _id_onMessage = _class.instanceMethodId( + r'onMessage', + r'(Lokhttp3/WebSocket;Ljava/lang/String;)V', + ); + + static final _onMessage = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public void onMessage(okhttp3.WebSocket webSocket, java.lang.String string) + void onMessage( + WebSocket webSocket, + jni.JString string, + ) { + _onMessage(reference.pointer, _id_onMessage as jni.JMethodIDPtr, + webSocket.reference.pointer, string.reference.pointer) + .check(); + } + + static final _id_onMessage1 = _class.instanceMethodId( + r'onMessage', + r'(Lokhttp3/WebSocket;Lokio/ByteString;)V', + ); + + static final _onMessage1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public void onMessage(okhttp3.WebSocket webSocket, okio.ByteString byteString) + void onMessage1( + WebSocket webSocket, + ByteString byteString, + ) { + _onMessage1(reference.pointer, _id_onMessage1 as jni.JMethodIDPtr, + webSocket.reference.pointer, byteString.reference.pointer) + .check(); + } + + static final _id_onClosing = _class.instanceMethodId( + r'onClosing', + r'(Lokhttp3/WebSocket;ILjava/lang/String;)V', + ); + + static final _onClosing = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + $Int32, + ffi.Pointer + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int, ffi.Pointer)>(); + + /// from: public void onClosing(okhttp3.WebSocket webSocket, int i, java.lang.String string) + void onClosing( + WebSocket webSocket, + int i, + jni.JString string, + ) { + _onClosing(reference.pointer, _id_onClosing as jni.JMethodIDPtr, + webSocket.reference.pointer, i, string.reference.pointer) + .check(); + } + + static final _id_onFailure = _class.instanceMethodId( + r'onFailure', + r'(Lokhttp3/WebSocket;Ljava/lang/Throwable;Lokhttp3/Response;)V', + ); + + static final _onFailure = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + /// from: public void onFailure(okhttp3.WebSocket webSocket, java.lang.Throwable throwable, okhttp3.Response response) + void onFailure( + WebSocket webSocket, + jni.JObject throwable, + Response response, + ) { + _onFailure( + reference.pointer, + _id_onFailure as jni.JMethodIDPtr, + webSocket.reference.pointer, + throwable.reference.pointer, + response.reference.pointer) + .check(); + } +} + +final class $WebSocketListenerProxyType + extends jni.JObjType { + const $WebSocketListenerProxyType(); + + @override + String get signature => r'Lcom/example/ok_http/WebSocketListenerProxy;'; + + @override + WebSocketListenerProxy fromReference(jni.JReference reference) => + WebSocketListenerProxy.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($WebSocketListenerProxyType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($WebSocketListenerProxyType) && + other is $WebSocketListenerProxyType; + } +} + +/// from: okio.ByteString$Companion +class ByteString_Companion extends jni.JObject { + @override + late final jni.JObjType $type = type; + + ByteString_Companion.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r'okio/ByteString$Companion'); + + /// The type which includes information such as the signature of this class. + static const type = $ByteString_CompanionType(); + static final _id_of = _class.instanceMethodId( + r'of', + r'([B)Lokio/ByteString;', + ); + + static final _of = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okio.ByteString of(byte[] bs) + /// The returned object must be released after use, by calling the [release] method. + ByteString of( + jni.JArray bs, + ) { + return _of( + reference.pointer, _id_of as jni.JMethodIDPtr, bs.reference.pointer) + .object(const $ByteStringType()); + } + + static final _id_of1 = _class.instanceMethodId( + r'of', + r'([BII)Lokio/ByteString;', + ); + + static final _of1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer, $Int32, $Int32)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int, int)>(); + + /// from: public final okio.ByteString of(byte[] bs, int i, int i1) + /// The returned object must be released after use, by calling the [release] method. + ByteString of1( + jni.JArray bs, + int i, + int i1, + ) { + return _of1(reference.pointer, _id_of1 as jni.JMethodIDPtr, + bs.reference.pointer, i, i1) + .object(const $ByteStringType()); + } + + static final _id_of2 = _class.instanceMethodId( + r'of', + r'(Ljava/nio/ByteBuffer;)Lokio/ByteString;', + ); + + static final _of2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okio.ByteString of(java.nio.ByteBuffer byteBuffer) + /// The returned object must be released after use, by calling the [release] method. + ByteString of2( + jni.JByteBuffer byteBuffer, + ) { + return _of2(reference.pointer, _id_of2 as jni.JMethodIDPtr, + byteBuffer.reference.pointer) + .object(const $ByteStringType()); + } + + static final _id_encodeUtf8 = _class.instanceMethodId( + r'encodeUtf8', + r'(Ljava/lang/String;)Lokio/ByteString;', + ); + + static final _encodeUtf8 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okio.ByteString encodeUtf8(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + ByteString encodeUtf8( + jni.JString string, + ) { + return _encodeUtf8(reference.pointer, _id_encodeUtf8 as jni.JMethodIDPtr, + string.reference.pointer) + .object(const $ByteStringType()); + } + + static final _id_encodeString = _class.instanceMethodId( + r'encodeString', + r'(Ljava/lang/String;Ljava/nio/charset/Charset;)Lokio/ByteString;', + ); + + static final _encodeString = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okio.ByteString encodeString(java.lang.String string, java.nio.charset.Charset charset) + /// The returned object must be released after use, by calling the [release] method. + ByteString encodeString( + jni.JString string, + jni.JObject charset, + ) { + return _encodeString( + reference.pointer, + _id_encodeString as jni.JMethodIDPtr, + string.reference.pointer, + charset.reference.pointer) + .object(const $ByteStringType()); + } + + static final _id_decodeBase64 = _class.instanceMethodId( + r'decodeBase64', + r'(Ljava/lang/String;)Lokio/ByteString;', + ); + + static final _decodeBase64 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okio.ByteString decodeBase64(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + ByteString decodeBase64( + jni.JString string, + ) { + return _decodeBase64(reference.pointer, + _id_decodeBase64 as jni.JMethodIDPtr, string.reference.pointer) + .object(const $ByteStringType()); + } + + static final _id_decodeHex = _class.instanceMethodId( + r'decodeHex', + r'(Ljava/lang/String;)Lokio/ByteString;', + ); + + static final _decodeHex = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okio.ByteString decodeHex(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + ByteString decodeHex( + jni.JString string, + ) { + return _decodeHex(reference.pointer, _id_decodeHex as jni.JMethodIDPtr, + string.reference.pointer) + .object(const $ByteStringType()); + } + + static final _id_read = _class.instanceMethodId( + r'read', + r'(Ljava/io/InputStream;I)Lokio/ByteString;', + ); + + static final _read = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer, $Int32)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int)>(); + + /// from: public final okio.ByteString read(java.io.InputStream inputStream, int i) + /// The returned object must be released after use, by calling the [release] method. + ByteString read( + jni.JObject inputStream, + int i, + ) { + return _read(reference.pointer, _id_read as jni.JMethodIDPtr, + inputStream.reference.pointer, i) + .object(const $ByteStringType()); + } + + static final _id_new0 = _class.constructorId( + r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_NewObject') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) + /// The returned object must be released after use, by calling the [release] method. + factory ByteString_Companion( + jni.JObject defaultConstructorMarker, + ) { + return ByteString_Companion.fromReference(_new0( + _class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, + defaultConstructorMarker.reference.pointer) + .reference); + } +} + +final class $ByteString_CompanionType + extends jni.JObjType { + const $ByteString_CompanionType(); + + @override + String get signature => r'Lokio/ByteString$Companion;'; + + @override + ByteString_Companion fromReference(jni.JReference reference) => + ByteString_Companion.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($ByteString_CompanionType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($ByteString_CompanionType) && + other is $ByteString_CompanionType; + } +} + +/// from: okio.ByteString +class ByteString extends jni.JObject { + @override + late final jni.JObjType $type = type; + + ByteString.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r'okio/ByteString'); + + /// The type which includes information such as the signature of this class. + static const type = $ByteStringType(); + static final _id_Companion = _class.staticFieldId( + r'Companion', + r'Lokio/ByteString$Companion;', + ); + + /// from: static public final okio.ByteString$Companion Companion + /// The returned object must be released after use, by calling the [release] method. + static ByteString_Companion get Companion => + _id_Companion.get(_class, const $ByteString_CompanionType()); + + static final _id_EMPTY = _class.staticFieldId( + r'EMPTY', + r'Lokio/ByteString;', + ); + + /// from: static public final okio.ByteString EMPTY + /// The returned object must be released after use, by calling the [release] method. + static ByteString get EMPTY => _id_EMPTY.get(_class, const $ByteStringType()); + + static final _id_new0 = _class.constructorId( + r'([B)V', + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_NewObject') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public void (byte[] bs) + /// The returned object must be released after use, by calling the [release] method. + factory ByteString( + jni.JArray bs, + ) { + return ByteString.fromReference(_new0(_class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, bs.reference.pointer) + .reference); + } + + static final _id_utf8 = _class.instanceMethodId( + r'utf8', + r'()Ljava/lang/String;', + ); + + static final _utf8 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public java.lang.String utf8() + /// The returned object must be released after use, by calling the [release] method. + jni.JString utf8() { + return _utf8(reference.pointer, _id_utf8 as jni.JMethodIDPtr) + .object(const jni.JStringType()); + } + + static final _id_string = _class.instanceMethodId( + r'string', + r'(Ljava/nio/charset/Charset;)Ljava/lang/String;', + ); + + static final _string = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public java.lang.String string(java.nio.charset.Charset charset) + /// The returned object must be released after use, by calling the [release] method. + jni.JString string( + jni.JObject charset, + ) { + return _string(reference.pointer, _id_string as jni.JMethodIDPtr, + charset.reference.pointer) + .object(const jni.JStringType()); + } + + static final _id_base64 = _class.instanceMethodId( + r'base64', + r'()Ljava/lang/String;', + ); + + static final _base64 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public java.lang.String base64() + /// The returned object must be released after use, by calling the [release] method. + jni.JString base64() { + return _base64(reference.pointer, _id_base64 as jni.JMethodIDPtr) + .object(const jni.JStringType()); + } + + static final _id_md5 = _class.instanceMethodId( + r'md5', + r'()Lokio/ByteString;', + ); + + static final _md5 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okio.ByteString md5() + /// The returned object must be released after use, by calling the [release] method. + ByteString md5() { + return _md5(reference.pointer, _id_md5 as jni.JMethodIDPtr) + .object(const $ByteStringType()); + } + + static final _id_sha1 = _class.instanceMethodId( + r'sha1', + r'()Lokio/ByteString;', + ); + + static final _sha1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okio.ByteString sha1() + /// The returned object must be released after use, by calling the [release] method. + ByteString sha1() { + return _sha1(reference.pointer, _id_sha1 as jni.JMethodIDPtr) + .object(const $ByteStringType()); + } + + static final _id_sha256 = _class.instanceMethodId( + r'sha256', + r'()Lokio/ByteString;', + ); + + static final _sha256 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okio.ByteString sha256() + /// The returned object must be released after use, by calling the [release] method. + ByteString sha256() { + return _sha256(reference.pointer, _id_sha256 as jni.JMethodIDPtr) + .object(const $ByteStringType()); + } + + static final _id_sha512 = _class.instanceMethodId( + r'sha512', + r'()Lokio/ByteString;', + ); + + static final _sha512 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okio.ByteString sha512() + /// The returned object must be released after use, by calling the [release] method. + ByteString sha512() { + return _sha512(reference.pointer, _id_sha512 as jni.JMethodIDPtr) + .object(const $ByteStringType()); + } + + static final _id_hmacSha1 = _class.instanceMethodId( + r'hmacSha1', + r'(Lokio/ByteString;)Lokio/ByteString;', + ); + + static final _hmacSha1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okio.ByteString hmacSha1(okio.ByteString byteString) + /// The returned object must be released after use, by calling the [release] method. + ByteString hmacSha1( + ByteString byteString, + ) { + return _hmacSha1(reference.pointer, _id_hmacSha1 as jni.JMethodIDPtr, + byteString.reference.pointer) + .object(const $ByteStringType()); + } + + static final _id_hmacSha256 = _class.instanceMethodId( + r'hmacSha256', + r'(Lokio/ByteString;)Lokio/ByteString;', + ); + + static final _hmacSha256 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okio.ByteString hmacSha256(okio.ByteString byteString) + /// The returned object must be released after use, by calling the [release] method. + ByteString hmacSha256( + ByteString byteString, + ) { + return _hmacSha256(reference.pointer, _id_hmacSha256 as jni.JMethodIDPtr, + byteString.reference.pointer) + .object(const $ByteStringType()); + } + + static final _id_hmacSha512 = _class.instanceMethodId( + r'hmacSha512', + r'(Lokio/ByteString;)Lokio/ByteString;', + ); + + static final _hmacSha512 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okio.ByteString hmacSha512(okio.ByteString byteString) + /// The returned object must be released after use, by calling the [release] method. + ByteString hmacSha512( + ByteString byteString, + ) { + return _hmacSha512(reference.pointer, _id_hmacSha512 as jni.JMethodIDPtr, + byteString.reference.pointer) + .object(const $ByteStringType()); + } + + static final _id_base64Url = _class.instanceMethodId( + r'base64Url', + r'()Ljava/lang/String;', + ); + + static final _base64Url = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public java.lang.String base64Url() + /// The returned object must be released after use, by calling the [release] method. + jni.JString base64Url() { + return _base64Url(reference.pointer, _id_base64Url as jni.JMethodIDPtr) + .object(const jni.JStringType()); + } + + static final _id_hex = _class.instanceMethodId( + r'hex', + r'()Ljava/lang/String;', + ); + + static final _hex = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public java.lang.String hex() + /// The returned object must be released after use, by calling the [release] method. + jni.JString hex() { + return _hex(reference.pointer, _id_hex as jni.JMethodIDPtr) + .object(const jni.JStringType()); + } + + static final _id_toAsciiLowercase = _class.instanceMethodId( + r'toAsciiLowercase', + r'()Lokio/ByteString;', + ); + + static final _toAsciiLowercase = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public okio.ByteString toAsciiLowercase() + /// The returned object must be released after use, by calling the [release] method. + ByteString toAsciiLowercase() { + return _toAsciiLowercase( + reference.pointer, _id_toAsciiLowercase as jni.JMethodIDPtr) + .object(const $ByteStringType()); + } + + static final _id_toAsciiUppercase = _class.instanceMethodId( + r'toAsciiUppercase', + r'()Lokio/ByteString;', + ); + + static final _toAsciiUppercase = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public okio.ByteString toAsciiUppercase() + /// The returned object must be released after use, by calling the [release] method. + ByteString toAsciiUppercase() { + return _toAsciiUppercase( + reference.pointer, _id_toAsciiUppercase as jni.JMethodIDPtr) + .object(const $ByteStringType()); + } + + static final _id_substring = _class.instanceMethodId( + r'substring', + r'(II)Lokio/ByteString;', + ); + + static final _substring = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<($Int32, $Int32)>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int, int)>(); + + /// from: public okio.ByteString substring(int i, int i1) + /// The returned object must be released after use, by calling the [release] method. + ByteString substring( + int i, + int i1, + ) { + return _substring( + reference.pointer, _id_substring as jni.JMethodIDPtr, i, i1) + .object(const $ByteStringType()); + } + + static final _id_getByte = _class.instanceMethodId( + r'getByte', + r'(I)B', + ); + + static final _getByte = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<($Int32,)>)>>('globalEnv_CallByteMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + + /// from: public final byte getByte(int i) + int getByte( + int i, + ) { + return _getByte(reference.pointer, _id_getByte as jni.JMethodIDPtr, i).byte; + } + + static final _id_size = _class.instanceMethodId( + r'size', + r'()I', + ); + + static final _size = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallIntMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final int size() + int size() { + return _size(reference.pointer, _id_size as jni.JMethodIDPtr).integer; + } + + static final _id_toByteArray = _class.instanceMethodId( + r'toByteArray', + r'()[B', + ); + + static final _toByteArray = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public byte[] toByteArray() + /// The returned object must be released after use, by calling the [release] method. + jni.JArray toByteArray() { + return _toByteArray(reference.pointer, _id_toByteArray as jni.JMethodIDPtr) + .object(const jni.JArrayType(jni.jbyteType())); + } + + static final _id_asByteBuffer = _class.instanceMethodId( + r'asByteBuffer', + r'()Ljava/nio/ByteBuffer;', + ); + + static final _asByteBuffer = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public java.nio.ByteBuffer asByteBuffer() + /// The returned object must be released after use, by calling the [release] method. + jni.JByteBuffer asByteBuffer() { + return _asByteBuffer( + reference.pointer, _id_asByteBuffer as jni.JMethodIDPtr) + .object(const jni.JByteBufferType()); + } + + static final _id_write = _class.instanceMethodId( + r'write', + r'(Ljava/io/OutputStream;)V', + ); + + static final _write = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public void write(java.io.OutputStream outputStream) + void write( + jni.JObject outputStream, + ) { + _write(reference.pointer, _id_write as jni.JMethodIDPtr, + outputStream.reference.pointer) + .check(); + } + + static final _id_rangeEquals = _class.instanceMethodId( + r'rangeEquals', + r'(ILokio/ByteString;II)Z', + ); + + static final _rangeEquals = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + $Int32, + ffi.Pointer, + $Int32, + $Int32 + )>)>>('globalEnv_CallBooleanMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, + ffi.Pointer, int, int)>(); + + /// from: public boolean rangeEquals(int i, okio.ByteString byteString, int i1, int i2) + bool rangeEquals( + int i, + ByteString byteString, + int i1, + int i2, + ) { + return _rangeEquals(reference.pointer, _id_rangeEquals as jni.JMethodIDPtr, + i, byteString.reference.pointer, i1, i2) + .boolean; + } + + static final _id_rangeEquals1 = _class.instanceMethodId( + r'rangeEquals', + r'(I[BII)Z', + ); + + static final _rangeEquals1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + $Int32, + ffi.Pointer, + $Int32, + $Int32 + )>)>>('globalEnv_CallBooleanMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, + ffi.Pointer, int, int)>(); + + /// from: public boolean rangeEquals(int i, byte[] bs, int i1, int i2) + bool rangeEquals1( + int i, + jni.JArray bs, + int i1, + int i2, + ) { + return _rangeEquals1( + reference.pointer, + _id_rangeEquals1 as jni.JMethodIDPtr, + i, + bs.reference.pointer, + i1, + i2) + .boolean; + } + + static final _id_copyInto = _class.instanceMethodId( + r'copyInto', + r'(I[BII)V', + ); + + static final _copyInto = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + $Int32, + ffi.Pointer, + $Int32, + $Int32 + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + int, ffi.Pointer, int, int)>(); + + /// from: public void copyInto(int i, byte[] bs, int i1, int i2) + void copyInto( + int i, + jni.JArray bs, + int i1, + int i2, + ) { + _copyInto(reference.pointer, _id_copyInto as jni.JMethodIDPtr, i, + bs.reference.pointer, i1, i2) + .check(); + } + + static final _id_startsWith = _class.instanceMethodId( + r'startsWith', + r'(Lokio/ByteString;)Z', + ); + + static final _startsWith = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallBooleanMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final boolean startsWith(okio.ByteString byteString) + bool startsWith( + ByteString byteString, + ) { + return _startsWith(reference.pointer, _id_startsWith as jni.JMethodIDPtr, + byteString.reference.pointer) + .boolean; + } + + static final _id_startsWith1 = _class.instanceMethodId( + r'startsWith', + r'([B)Z', + ); + + static final _startsWith1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallBooleanMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final boolean startsWith(byte[] bs) + bool startsWith1( + jni.JArray bs, + ) { + return _startsWith1(reference.pointer, _id_startsWith1 as jni.JMethodIDPtr, + bs.reference.pointer) + .boolean; + } + + static final _id_endsWith = _class.instanceMethodId( + r'endsWith', + r'(Lokio/ByteString;)Z', + ); + + static final _endsWith = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallBooleanMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final boolean endsWith(okio.ByteString byteString) + bool endsWith( + ByteString byteString, + ) { + return _endsWith(reference.pointer, _id_endsWith as jni.JMethodIDPtr, + byteString.reference.pointer) + .boolean; + } + + static final _id_endsWith1 = _class.instanceMethodId( + r'endsWith', + r'([B)Z', + ); + + static final _endsWith1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallBooleanMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final boolean endsWith(byte[] bs) + bool endsWith1( + jni.JArray bs, + ) { + return _endsWith1(reference.pointer, _id_endsWith1 as jni.JMethodIDPtr, + bs.reference.pointer) + .boolean; + } + + static final _id_indexOf = _class.instanceMethodId( + r'indexOf', + r'(Lokio/ByteString;I)I', + ); + + static final _indexOf = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer, $Int32)>)>>( + 'globalEnv_CallIntMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int)>(); + + /// from: public final int indexOf(okio.ByteString byteString, int i) + int indexOf( + ByteString byteString, + int i, + ) { + return _indexOf(reference.pointer, _id_indexOf as jni.JMethodIDPtr, + byteString.reference.pointer, i) + .integer; + } + + static final _id_indexOf1 = _class.instanceMethodId( + r'indexOf', + r'([BI)I', + ); + + static final _indexOf1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer, $Int32)>)>>( + 'globalEnv_CallIntMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int)>(); + + /// from: public int indexOf(byte[] bs, int i) + int indexOf1( + jni.JArray bs, + int i, + ) { + return _indexOf1(reference.pointer, _id_indexOf1 as jni.JMethodIDPtr, + bs.reference.pointer, i) + .integer; + } + + static final _id_lastIndexOf = _class.instanceMethodId( + r'lastIndexOf', + r'(Lokio/ByteString;I)I', + ); + + static final _lastIndexOf = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer, $Int32)>)>>( + 'globalEnv_CallIntMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int)>(); + + /// from: public final int lastIndexOf(okio.ByteString byteString, int i) + int lastIndexOf( + ByteString byteString, + int i, + ) { + return _lastIndexOf(reference.pointer, _id_lastIndexOf as jni.JMethodIDPtr, + byteString.reference.pointer, i) + .integer; + } + + static final _id_lastIndexOf1 = _class.instanceMethodId( + r'lastIndexOf', + r'([BI)I', + ); + + static final _lastIndexOf1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer, $Int32)>)>>( + 'globalEnv_CallIntMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int)>(); + + /// from: public int lastIndexOf(byte[] bs, int i) + int lastIndexOf1( + jni.JArray bs, + int i, + ) { + return _lastIndexOf1(reference.pointer, + _id_lastIndexOf1 as jni.JMethodIDPtr, bs.reference.pointer, i) + .integer; + } + + static final _id_equals = _class.instanceMethodId( + r'equals', + r'(Ljava/lang/Object;)Z', + ); + + static final _equals = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallBooleanMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public boolean equals(java.lang.Object object) + bool equals( + jni.JObject object, + ) { + return _equals(reference.pointer, _id_equals as jni.JMethodIDPtr, + object.reference.pointer) + .boolean; + } + + static final _id_hashCode1 = _class.instanceMethodId( + r'hashCode', + r'()I', + ); + + static final _hashCode1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallIntMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public int hashCode() + int hashCode1() { + return _hashCode1(reference.pointer, _id_hashCode1 as jni.JMethodIDPtr) + .integer; + } + + static final _id_compareTo = _class.instanceMethodId( + r'compareTo', + r'(Lokio/ByteString;)I', + ); + + static final _compareTo = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallIntMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public int compareTo(okio.ByteString byteString) + int compareTo( + ByteString byteString, + ) { + return _compareTo(reference.pointer, _id_compareTo as jni.JMethodIDPtr, + byteString.reference.pointer) + .integer; + } + + static final _id_toString1 = _class.instanceMethodId( + r'toString', + r'()Ljava/lang/String;', + ); + + static final _toString1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public java.lang.String toString() + /// The returned object must be released after use, by calling the [release] method. + jni.JString toString1() { + return _toString1(reference.pointer, _id_toString1 as jni.JMethodIDPtr) + .object(const jni.JStringType()); + } + + static final _id_substring1 = _class.instanceMethodId( + r'substring', + r'(I)Lokio/ByteString;', + ); + + static final _substring1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<($Int32,)>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + + /// from: public final okio.ByteString substring(int i) + /// The returned object must be released after use, by calling the [release] method. + ByteString substring1( + int i, + ) { + return _substring1(reference.pointer, _id_substring1 as jni.JMethodIDPtr, i) + .object(const $ByteStringType()); + } + + static final _id_substring2 = _class.instanceMethodId( + r'substring', + r'()Lokio/ByteString;', + ); + + static final _substring2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okio.ByteString substring() + /// The returned object must be released after use, by calling the [release] method. + ByteString substring2() { + return _substring2(reference.pointer, _id_substring2 as jni.JMethodIDPtr) + .object(const $ByteStringType()); + } + + static final _id_indexOf2 = _class.instanceMethodId( + r'indexOf', + r'(Lokio/ByteString;)I', + ); + + static final _indexOf2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallIntMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final int indexOf(okio.ByteString byteString) + int indexOf2( + ByteString byteString, + ) { + return _indexOf2(reference.pointer, _id_indexOf2 as jni.JMethodIDPtr, + byteString.reference.pointer) + .integer; + } + + static final _id_indexOf3 = _class.instanceMethodId( + r'indexOf', + r'([B)I', + ); + + static final _indexOf3 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallIntMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final int indexOf(byte[] bs) + int indexOf3( + jni.JArray bs, + ) { + return _indexOf3(reference.pointer, _id_indexOf3 as jni.JMethodIDPtr, + bs.reference.pointer) + .integer; + } + + static final _id_lastIndexOf2 = _class.instanceMethodId( + r'lastIndexOf', + r'(Lokio/ByteString;)I', + ); + + static final _lastIndexOf2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallIntMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final int lastIndexOf(okio.ByteString byteString) + int lastIndexOf2( + ByteString byteString, + ) { + return _lastIndexOf2(reference.pointer, + _id_lastIndexOf2 as jni.JMethodIDPtr, byteString.reference.pointer) + .integer; + } + + static final _id_lastIndexOf3 = _class.instanceMethodId( + r'lastIndexOf', + r'([B)I', + ); + + static final _lastIndexOf3 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallIntMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final int lastIndexOf(byte[] bs) + int lastIndexOf3( + jni.JArray bs, + ) { + return _lastIndexOf3(reference.pointer, + _id_lastIndexOf3 as jni.JMethodIDPtr, bs.reference.pointer) + .integer; + } + + static final _id_of = _class.staticMethodId( + r'of', + r'([B)Lokio/ByteString;', + ); + + static final _of = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: static public final okio.ByteString of(byte[] bs) + /// The returned object must be released after use, by calling the [release] method. + static ByteString of( + jni.JArray bs, + ) { + return _of(_class.reference.pointer, _id_of as jni.JMethodIDPtr, + bs.reference.pointer) + .object(const $ByteStringType()); + } + + static final _id_of1 = _class.staticMethodId( + r'of', + r'([BII)Lokio/ByteString;', + ); + + static final _of1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer, $Int32, $Int32)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int, int)>(); + + /// from: static public final okio.ByteString of(byte[] bs, int i, int i1) + /// The returned object must be released after use, by calling the [release] method. + static ByteString of1( + jni.JArray bs, + int i, + int i1, + ) { + return _of1(_class.reference.pointer, _id_of1 as jni.JMethodIDPtr, + bs.reference.pointer, i, i1) + .object(const $ByteStringType()); + } + + static final _id_of2 = _class.staticMethodId( + r'of', + r'(Ljava/nio/ByteBuffer;)Lokio/ByteString;', + ); + + static final _of2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: static public final okio.ByteString of(java.nio.ByteBuffer byteBuffer) + /// The returned object must be released after use, by calling the [release] method. + static ByteString of2( + jni.JByteBuffer byteBuffer, + ) { + return _of2(_class.reference.pointer, _id_of2 as jni.JMethodIDPtr, + byteBuffer.reference.pointer) + .object(const $ByteStringType()); + } + + static final _id_encodeUtf8 = _class.staticMethodId( + r'encodeUtf8', + r'(Ljava/lang/String;)Lokio/ByteString;', + ); + + static final _encodeUtf8 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: static public final okio.ByteString encodeUtf8(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + static ByteString encodeUtf8( + jni.JString string, + ) { + return _encodeUtf8(_class.reference.pointer, + _id_encodeUtf8 as jni.JMethodIDPtr, string.reference.pointer) + .object(const $ByteStringType()); + } + + static final _id_encodeString = _class.staticMethodId( + r'encodeString', + r'(Ljava/lang/String;Ljava/nio/charset/Charset;)Lokio/ByteString;', + ); + + static final _encodeString = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: static public final okio.ByteString encodeString(java.lang.String string, java.nio.charset.Charset charset) + /// The returned object must be released after use, by calling the [release] method. + static ByteString encodeString( + jni.JString string, + jni.JObject charset, + ) { + return _encodeString( + _class.reference.pointer, + _id_encodeString as jni.JMethodIDPtr, + string.reference.pointer, + charset.reference.pointer) + .object(const $ByteStringType()); + } + + static final _id_decodeBase64 = _class.staticMethodId( + r'decodeBase64', + r'(Ljava/lang/String;)Lokio/ByteString;', + ); + + static final _decodeBase64 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: static public final okio.ByteString decodeBase64(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + static ByteString decodeBase64( + jni.JString string, + ) { + return _decodeBase64(_class.reference.pointer, + _id_decodeBase64 as jni.JMethodIDPtr, string.reference.pointer) + .object(const $ByteStringType()); + } + + static final _id_decodeHex = _class.staticMethodId( + r'decodeHex', + r'(Ljava/lang/String;)Lokio/ByteString;', + ); + + static final _decodeHex = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: static public final okio.ByteString decodeHex(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + static ByteString decodeHex( + jni.JString string, + ) { + return _decodeHex(_class.reference.pointer, + _id_decodeHex as jni.JMethodIDPtr, string.reference.pointer) + .object(const $ByteStringType()); + } + + static final _id_read = _class.staticMethodId( + r'read', + r'(Ljava/io/InputStream;I)Lokio/ByteString;', + ); + + static final _read = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer, $Int32)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int)>(); + + /// from: static public final okio.ByteString read(java.io.InputStream inputStream, int i) + /// The returned object must be released after use, by calling the [release] method. + static ByteString read( + jni.JObject inputStream, + int i, + ) { + return _read(_class.reference.pointer, _id_read as jni.JMethodIDPtr, + inputStream.reference.pointer, i) + .object(const $ByteStringType()); + } + + static final _id_compareTo1 = _class.instanceMethodId( + r'compareTo', + r'(Ljava/lang/Object;)I', + ); + + static final _compareTo1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallIntMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public int compareTo(java.lang.Object object) + int compareTo1( + jni.JObject object, + ) { + return _compareTo1(reference.pointer, _id_compareTo1 as jni.JMethodIDPtr, + object.reference.pointer) + .integer; + } +} + +final class $ByteStringType extends jni.JObjType { + const $ByteStringType(); + + @override + String get signature => r'Lokio/ByteString;'; + + @override + ByteString fromReference(jni.JReference reference) => + ByteString.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($ByteStringType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($ByteStringType) && other is $ByteStringType; + } +} + +/// from: com.example.ok_http.WebSocketInterceptor$Companion +class WebSocketInterceptor_Companion extends jni.JObject { + @override + late final jni.JObjType $type = type; + + WebSocketInterceptor_Companion.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = + jni.JClass.forName(r'com/example/ok_http/WebSocketInterceptor$Companion'); + + /// The type which includes information such as the signature of this class. + static const type = $WebSocketInterceptor_CompanionType(); + static final _id_addWSInterceptor = _class.instanceMethodId( + r'addWSInterceptor', + r'(Lokhttp3/OkHttpClient$Builder;)Lokhttp3/OkHttpClient$Builder;', + ); + + static final _addWSInterceptor = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder addWSInterceptor(okhttp3.OkHttpClient$Builder builder) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder addWSInterceptor( + OkHttpClient_Builder builder, + ) { + return _addWSInterceptor(reference.pointer, + _id_addWSInterceptor as jni.JMethodIDPtr, builder.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_new0 = _class.constructorId( + r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_NewObject') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) + /// The returned object must be released after use, by calling the [release] method. + factory WebSocketInterceptor_Companion( + jni.JObject defaultConstructorMarker, + ) { + return WebSocketInterceptor_Companion.fromReference(_new0( + _class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, + defaultConstructorMarker.reference.pointer) + .reference); + } +} + +final class $WebSocketInterceptor_CompanionType + extends jni.JObjType { + const $WebSocketInterceptor_CompanionType(); + + @override + String get signature => + r'Lcom/example/ok_http/WebSocketInterceptor$Companion;'; + + @override + WebSocketInterceptor_Companion fromReference(jni.JReference reference) => + WebSocketInterceptor_Companion.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($WebSocketInterceptor_CompanionType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($WebSocketInterceptor_CompanionType) && + other is $WebSocketInterceptor_CompanionType; + } +} + +/// from: com.example.ok_http.WebSocketInterceptor +class WebSocketInterceptor extends jni.JObject { + @override + late final jni.JObjType $type = type; + + WebSocketInterceptor.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = + jni.JClass.forName(r'com/example/ok_http/WebSocketInterceptor'); + + /// The type which includes information such as the signature of this class. + static const type = $WebSocketInterceptorType(); + static final _id_Companion = _class.staticFieldId( + r'Companion', + r'Lcom/example/ok_http/WebSocketInterceptor$Companion;', + ); + + /// from: static public final com.example.ok_http.WebSocketInterceptor$Companion Companion + /// The returned object must be released after use, by calling the [release] method. + static WebSocketInterceptor_Companion get Companion => + _id_Companion.get(_class, const $WebSocketInterceptor_CompanionType()); + + static final _id_new0 = _class.constructorId( + r'()V', + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_NewObject') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public void () + /// The returned object must be released after use, by calling the [release] method. + factory WebSocketInterceptor() { + return WebSocketInterceptor.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); + } +} + +final class $WebSocketInterceptorType + extends jni.JObjType { + const $WebSocketInterceptorType(); + + @override + String get signature => r'Lcom/example/ok_http/WebSocketInterceptor;'; + + @override + WebSocketInterceptor fromReference(jni.JReference reference) => + WebSocketInterceptor.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($WebSocketInterceptorType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($WebSocketInterceptorType) && + other is $WebSocketInterceptorType; + } +} diff --git a/pkgs/ok_http/lib/src/ok_http_client.dart b/pkgs/ok_http/lib/src/ok_http_client.dart index 33b1bfd5eb..752dbaa41a 100644 --- a/pkgs/ok_http/lib/src/ok_http_client.dart +++ b/pkgs/ok_http/lib/src/ok_http_client.dart @@ -57,14 +57,7 @@ class OkHttpClient extends BaseClient { // Refer to OkHttp documentation for the shutdown procedure: // https://square.github.io/okhttp/5.x/okhttp/okhttp3/-ok-http-client/index.html#:~:text=Shutdown - // Bindings for `java.util.concurrent.ExecutorService` are erroneous. - // https://github.com/dart-lang/native/issues/588 - // So, use the JClass API to call the `shutdown` method by its signature. - _client - .dispatcher() - .executorService() - .jClass - .instanceMethodId('shutdown', '()V'); + _client.dispatcher().executorService().shutdown(); // Remove all idle connections from the resource pool. _client.connectionPool().evictAll(); @@ -293,12 +286,6 @@ extension on Uint8List { } extension on JArray { - Uint8List toUint8List({int? length}) { - length ??= this.length; - final list = Uint8List(length); - for (var i = 0; i < length; i++) { - list[i] = this[i]; - } - return list; - } + Uint8List toUint8List({int? length}) => + getRange(0, length ?? this.length).buffer.asUint8List(); } diff --git a/pkgs/ok_http/lib/src/ok_http_web_socket.dart b/pkgs/ok_http/lib/src/ok_http_web_socket.dart new file mode 100644 index 0000000000..4136a62852 --- /dev/null +++ b/pkgs/ok_http/lib/src/ok_http_web_socket.dart @@ -0,0 +1,229 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:convert'; +import 'dart:typed_data'; + +import 'package:jni/jni.dart'; +import 'package:web_socket/web_socket.dart'; + +import 'jni/bindings.dart' as bindings; + +/// A [WebSocket] implemented using the OkHttp library's +/// [WebSocket](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-web-socket/index.html) +/// API. +/// +/// Example usage of [OkHttpWebSocket]: +/// ```dart +/// import 'package:ok_http/ok_http.dart'; +/// import 'package:web_socket/web_socket.dart'; +/// +/// void main() async { +/// final socket = await OkHttpWebSocket.connect( +/// Uri.parse('wss://ws.postman-echo.com/raw')); +/// +/// socket.events.listen((e) async { +/// switch (e) { +/// case TextDataReceived(text: final text): +/// print('Received Text: $text'); +/// await socket.close(); +/// case BinaryDataReceived(data: final data): +/// print('Received Binary: $data'); +/// case CloseReceived(code: final code, reason: final reason): +/// print('Connection to server closed: $code [$reason]'); +/// } +/// }); +/// } +/// ``` +class OkHttpWebSocket implements WebSocket { + late bindings.OkHttpClient _client; + late final bindings.WebSocket _webSocket; + final _events = StreamController(); + String? _protocol; + + /// Private constructor to prevent direct instantiation. + /// + /// Used by [connect] to create a new WebSocket connection, which requires a + /// [bindings.OkHttpClient] instance (see [_connect]), and cannot be accessed + /// statically. + OkHttpWebSocket._() { + // Add the WebSocketInterceptor to prevent response parsing errors. + _client = bindings.WebSocketInterceptor.Companion + .addWSInterceptor(bindings.OkHttpClient_Builder()) + .build(); + } + + /// Create a new WebSocket connection using `OkHttp`'s + /// [WebSocket](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-web-socket/index.html) + /// API. + /// + /// The URL supplied in [url] must use the scheme ws or wss. + /// + /// If provided, the [protocols] argument indicates the subprotocols that + /// the peer is able to select. See + /// [RFC-6455 1.9](https://datatracker.ietf.org/doc/html/rfc6455#section-1.9). + static Future connect(Uri url, + {Iterable? protocols}) async => + OkHttpWebSocket._()._connect(url, protocols); + + Future _connect(Uri url, Iterable? protocols) async { + if (!url.isScheme('ws') && !url.isScheme('wss')) { + throw ArgumentError.value( + url, 'url', 'only ws: and wss: schemes are supported'); + } + + final requestBuilder = + bindings.Request_Builder().url1(url.toString().toJString()); + + if (protocols != null) { + requestBuilder.addHeader('Sec-WebSocket-Protocol'.toJString(), + protocols.join(', ').toJString()); + } + + var openCompleter = Completer(); + + _client.newWebSocket( + requestBuilder.build(), + bindings.WebSocketListenerProxy( + bindings.WebSocketListenerProxy_WebSocketListener.implement( + bindings.$WebSocketListenerProxy_WebSocketListenerImpl( + onOpen: (webSocket, response) { + _webSocket = webSocket; + + var protocolHeader = + response.header1('sec-websocket-protocol'.toJString()); + if (!protocolHeader.isNull) { + _protocol = protocolHeader.toDartString(releaseOriginal: true); + if (!(protocols?.contains(_protocol) ?? true)) { + openCompleter + .completeError(WebSocketException('Protocol mismatch. ' + 'Expected one of $protocols, but received $_protocol')); + return; + } + } + + openCompleter.complete(this); + }, + onMessage: (bindings.WebSocket webSocket, JString string) { + if (_events.isClosed) return; + _events.add(TextDataReceived(string.toDartString())); + }, + onMessage1: + (bindings.WebSocket webSocket, bindings.ByteString byteString) { + if (_events.isClosed) return; + _events.add( + BinaryDataReceived(byteString.toByteArray().toUint8List())); + }, + onClosing: + (bindings.WebSocket webSocket, int i, JString string) async { + _okHttpClientClose(); + + if (_events.isClosed) return; + + _events.add(CloseReceived(i, string.toDartString())); + await _events.close(); + }, + onFailure: (bindings.WebSocket webSocket, JObject throwable, + bindings.Response response) { + if (_events.isClosed) return; + + var throwableString = throwable.toString(); + + // If the throwable is: + // - java.net.ProtocolException: Control frames must be final. + // - java.io.EOFException + // - java.net.SocketException: Socket closed + // Then the connection was closed abnormally. + if (throwableString.contains(RegExp( + r'(java\.net\.ProtocolException: Control frames must be final\.|java\.io\.EOFException|java\.net\.SocketException: Socket closed)'))) { + _events.add(CloseReceived(1006, 'abnormal close')); + unawaited(_events.close()); + return; + } + var error = WebSocketException( + 'Connection ended unexpectedly $throwableString'); + if (openCompleter.isCompleted) { + _events.addError(error); + return; + } + openCompleter.completeError(error); + }, + )))); + + return openCompleter.future; + } + + @override + Future close([int? code, String? reason]) async { + if (_events.isClosed) { + throw WebSocketConnectionClosed(); + } + + if (code != null && code != 1000 && !(code >= 3000 && code <= 4999)) { + throw ArgumentError('Invalid argument: $code, close code must be 1000 or ' + 'in the range 3000-4999'); + } + if (reason != null && utf8.encode(reason).length > 123) { + throw ArgumentError.value(reason, 'reason', + 'reason must be <= 123 bytes long when encoded as UTF-8'); + } + + unawaited(_events.close()); + + // When no code is provided, cause an abnormal closure to send 1005. + if (code == null) { + _webSocket.cancel(); + return; + } + + _webSocket.close( + code, reason?.toJString() ?? JString.fromReference(jNullReference)); + } + + @override + Stream get events => _events.stream; + + @override + String get protocol => _protocol ?? ''; + + @override + void sendBytes(Uint8List b) { + if (_events.isClosed) { + throw WebSocketConnectionClosed(); + } + _webSocket.send1(bindings.ByteString.of(b.toJArray())); + } + + @override + void sendText(String s) { + if (_events.isClosed) { + throw WebSocketConnectionClosed(); + } + _webSocket.send(s.toJString()); + } + + /// Closes the OkHttpClient using the recommended shutdown procedure. + /// + /// https://square.github.io/okhttp/5.x/okhttp/okhttp3/-ok-http-client/index.html#:~:text=Shutdown + void _okHttpClientClose() { + _client.dispatcher().executorService().shutdown(); + _client.connectionPool().evictAll(); + var cache = _client.cache(); + if (!cache.isNull) { + cache.close(); + } + _client.release(); + } +} + +extension on Uint8List { + JArray toJArray() => + JArray(jbyte.type, length)..setRange(0, length, this); +} + +extension on JArray { + Uint8List toUint8List({int? length}) => + getRange(0, length ?? this.length).buffer.asUint8List(); +} diff --git a/pkgs/ok_http/pubspec.yaml b/pkgs/ok_http/pubspec.yaml index 68ff974261..f2b817dc8a 100644 --- a/pkgs/ok_http/pubspec.yaml +++ b/pkgs/ok_http/pubspec.yaml @@ -1,5 +1,5 @@ name: ok_http -version: 0.1.0-wip +version: 0.1.0 description: >- An Android Flutter plugin that provides access to the OkHttp HTTP client. repository: https://github.com/dart-lang/http/tree/master/pkgs/ok_http @@ -14,12 +14,13 @@ dependencies: sdk: flutter http: ^1.2.1 http_profile: ^0.1.0 - jni: ^0.9.2 + jni: ^0.10.1 plugin_platform_interface: ^2.0.2 + web_socket: ^0.1.5 dev_dependencies: dart_flutter_team_lints: ^3.0.0 - jnigen: ^0.9.1 + jnigen: ^0.10.0 flutter: plugin: