| // Autogenerated by jnigen. DO NOT EDIT! |
| |
| // ignore_for_file: annotate_overrides |
| // ignore_for_file: camel_case_extensions |
| // ignore_for_file: camel_case_types |
| // ignore_for_file: constant_identifier_names |
| // ignore_for_file: file_names |
| // ignore_for_file: no_leading_underscores_for_local_identifiers |
| // ignore_for_file: non_constant_identifier_names |
| // ignore_for_file: overridden_fields |
| // ignore_for_file: unnecessary_cast |
| // ignore_for_file: unused_element |
| // ignore_for_file: unused_field |
| // ignore_for_file: unused_import |
| // ignore_for_file: unused_shown_name |
| |
| 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 "URLConnection.dart" as urlconnection_; |
| |
| import "../io/InputStream.dart" as inputstream_; |
| |
| /// from: java.net.URL |
| class URL extends jni.JObject { |
| @override |
| late final jni.JObjType<URL> $type = type; |
| |
| URL.fromRef( |
| jni.JObjectPtr ref, |
| ) : super.fromRef(ref); |
| |
| static final _class = jni.Jni.findJClass(r"java/net/URL"); |
| |
| /// The type which includes information such as the signature of this class. |
| static const type = $URLType(); |
| static final _id_ctor = jni.Jni.accessors.getMethodIDOf(_class.reference, |
| r"<init>", r"(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;)V"); |
| |
| /// from: public void <init>(java.lang.String string, java.lang.String string1, int i, java.lang.String string2) |
| /// The returned object must be deleted after use, by calling the `delete` method. |
| factory URL( |
| jni.JString string, |
| jni.JString string1, |
| int i, |
| jni.JString string2, |
| ) { |
| return URL.fromRef(jni.Jni.accessors.newObjectWithArgs( |
| _class.reference, _id_ctor, [ |
| string.reference, |
| string1.reference, |
| jni.JValueInt(i), |
| string2.reference |
| ]).object); |
| } |
| |
| static final _id_ctor1 = jni.Jni.accessors.getMethodIDOf(_class.reference, |
| r"<init>", r"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V"); |
| |
| /// from: public void <init>(java.lang.String string, java.lang.String string1, java.lang.String string2) |
| /// The returned object must be deleted after use, by calling the `delete` method. |
| factory URL.ctor1( |
| jni.JString string, |
| jni.JString string1, |
| jni.JString string2, |
| ) { |
| return URL.fromRef(jni.Jni.accessors.newObjectWithArgs( |
| _class.reference, |
| _id_ctor1, |
| [string.reference, string1.reference, string2.reference]).object); |
| } |
| |
| static final _id_ctor2 = jni.Jni.accessors.getMethodIDOf( |
| _class.reference, |
| r"<init>", |
| r"(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/net/URLStreamHandler;)V"); |
| |
| /// from: public void <init>(java.lang.String string, java.lang.String string1, int i, java.lang.String string2, java.net.URLStreamHandler uRLStreamHandler) |
| /// The returned object must be deleted after use, by calling the `delete` method. |
| factory URL.ctor2( |
| jni.JString string, |
| jni.JString string1, |
| int i, |
| jni.JString string2, |
| jni.JObject uRLStreamHandler, |
| ) { |
| return URL.fromRef( |
| jni.Jni.accessors.newObjectWithArgs(_class.reference, _id_ctor2, [ |
| string.reference, |
| string1.reference, |
| jni.JValueInt(i), |
| string2.reference, |
| uRLStreamHandler.reference |
| ]).object); |
| } |
| |
| static final _id_ctor3 = jni.Jni.accessors |
| .getMethodIDOf(_class.reference, r"<init>", r"(Ljava/lang/String;)V"); |
| |
| /// from: public void <init>(java.lang.String string) |
| /// The returned object must be deleted after use, by calling the `delete` method. |
| factory URL.ctor3( |
| jni.JString string, |
| ) { |
| return URL.fromRef(jni.Jni.accessors.newObjectWithArgs( |
| _class.reference, _id_ctor3, [string.reference]).object); |
| } |
| |
| static final _id_ctor4 = jni.Jni.accessors.getMethodIDOf( |
| _class.reference, r"<init>", r"(Ljava/net/URL;Ljava/lang/String;)V"); |
| |
| /// from: public void <init>(java.net.URL uRL, java.lang.String string) |
| /// The returned object must be deleted after use, by calling the `delete` method. |
| factory URL.ctor4( |
| URL uRL, |
| jni.JString string, |
| ) { |
| return URL.fromRef(jni.Jni.accessors.newObjectWithArgs( |
| _class.reference, _id_ctor4, [uRL.reference, string.reference]).object); |
| } |
| |
| static final _id_ctor5 = jni.Jni.accessors.getMethodIDOf( |
| _class.reference, |
| r"<init>", |
| r"(Ljava/net/URL;Ljava/lang/String;Ljava/net/URLStreamHandler;)V"); |
| |
| /// from: public void <init>(java.net.URL uRL, java.lang.String string, java.net.URLStreamHandler uRLStreamHandler) |
| /// The returned object must be deleted after use, by calling the `delete` method. |
| factory URL.ctor5( |
| URL uRL, |
| jni.JString string, |
| jni.JObject uRLStreamHandler, |
| ) { |
| return URL.fromRef(jni.Jni.accessors.newObjectWithArgs( |
| _class.reference, |
| _id_ctor5, |
| [uRL.reference, string.reference, uRLStreamHandler.reference]).object); |
| } |
| |
| static final _id_getQuery = jni.Jni.accessors |
| .getMethodIDOf(_class.reference, r"getQuery", r"()Ljava/lang/String;"); |
| |
| /// from: public java.lang.String getQuery() |
| /// The returned object must be deleted after use, by calling the `delete` method. |
| jni.JString getQuery() { |
| return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( |
| reference, _id_getQuery, jni.JniCallType.objectType, []).object); |
| } |
| |
| static final _id_getPath = jni.Jni.accessors |
| .getMethodIDOf(_class.reference, r"getPath", r"()Ljava/lang/String;"); |
| |
| /// from: public java.lang.String getPath() |
| /// The returned object must be deleted after use, by calling the `delete` method. |
| jni.JString getPath() { |
| return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( |
| reference, _id_getPath, jni.JniCallType.objectType, []).object); |
| } |
| |
| static final _id_getUserInfo = jni.Jni.accessors |
| .getMethodIDOf(_class.reference, r"getUserInfo", r"()Ljava/lang/String;"); |
| |
| /// from: public java.lang.String getUserInfo() |
| /// The returned object must be deleted after use, by calling the `delete` method. |
| jni.JString getUserInfo() { |
| return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( |
| reference, _id_getUserInfo, jni.JniCallType.objectType, []).object); |
| } |
| |
| static final _id_getAuthority = jni.Jni.accessors.getMethodIDOf( |
| _class.reference, r"getAuthority", r"()Ljava/lang/String;"); |
| |
| /// from: public java.lang.String getAuthority() |
| /// The returned object must be deleted after use, by calling the `delete` method. |
| jni.JString getAuthority() { |
| return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( |
| reference, _id_getAuthority, jni.JniCallType.objectType, []).object); |
| } |
| |
| static final _id_getPort = |
| jni.Jni.accessors.getMethodIDOf(_class.reference, r"getPort", r"()I"); |
| |
| /// from: public int getPort() |
| int getPort() { |
| return jni.Jni.accessors.callMethodWithArgs( |
| reference, _id_getPort, jni.JniCallType.intType, []).integer; |
| } |
| |
| static final _id_getDefaultPort = jni.Jni.accessors |
| .getMethodIDOf(_class.reference, r"getDefaultPort", r"()I"); |
| |
| /// from: public int getDefaultPort() |
| int getDefaultPort() { |
| return jni.Jni.accessors.callMethodWithArgs( |
| reference, _id_getDefaultPort, jni.JniCallType.intType, []).integer; |
| } |
| |
| static final _id_getProtocol = jni.Jni.accessors |
| .getMethodIDOf(_class.reference, r"getProtocol", r"()Ljava/lang/String;"); |
| |
| /// from: public java.lang.String getProtocol() |
| /// The returned object must be deleted after use, by calling the `delete` method. |
| jni.JString getProtocol() { |
| return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( |
| reference, _id_getProtocol, jni.JniCallType.objectType, []).object); |
| } |
| |
| static final _id_getHost = jni.Jni.accessors |
| .getMethodIDOf(_class.reference, r"getHost", r"()Ljava/lang/String;"); |
| |
| /// from: public java.lang.String getHost() |
| /// The returned object must be deleted after use, by calling the `delete` method. |
| jni.JString getHost() { |
| return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( |
| reference, _id_getHost, jni.JniCallType.objectType, []).object); |
| } |
| |
| static final _id_getFile = jni.Jni.accessors |
| .getMethodIDOf(_class.reference, r"getFile", r"()Ljava/lang/String;"); |
| |
| /// from: public java.lang.String getFile() |
| /// The returned object must be deleted after use, by calling the `delete` method. |
| jni.JString getFile() { |
| return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( |
| reference, _id_getFile, jni.JniCallType.objectType, []).object); |
| } |
| |
| static final _id_getRef = jni.Jni.accessors |
| .getMethodIDOf(_class.reference, r"getRef", r"()Ljava/lang/String;"); |
| |
| /// from: public java.lang.String getRef() |
| /// The returned object must be deleted after use, by calling the `delete` method. |
| jni.JString getRef() { |
| return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( |
| reference, _id_getRef, jni.JniCallType.objectType, []).object); |
| } |
| |
| static final _id_equals1 = jni.Jni.accessors |
| .getMethodIDOf(_class.reference, r"equals", r"(Ljava/lang/Object;)Z"); |
| |
| /// from: public boolean equals(java.lang.Object object) |
| bool equals1( |
| jni.JObject object, |
| ) { |
| return jni.Jni.accessors.callMethodWithArgs(reference, _id_equals1, |
| jni.JniCallType.booleanType, [object.reference]).boolean; |
| } |
| |
| static final _id_hashCode1 = |
| jni.Jni.accessors.getMethodIDOf(_class.reference, r"hashCode", r"()I"); |
| |
| /// from: public int hashCode() |
| int hashCode1() { |
| return jni.Jni.accessors.callMethodWithArgs( |
| reference, _id_hashCode1, jni.JniCallType.intType, []).integer; |
| } |
| |
| static final _id_sameFile = jni.Jni.accessors |
| .getMethodIDOf(_class.reference, r"sameFile", r"(Ljava/net/URL;)Z"); |
| |
| /// from: public boolean sameFile(java.net.URL uRL) |
| bool sameFile( |
| URL uRL, |
| ) { |
| return jni.Jni.accessors.callMethodWithArgs(reference, _id_sameFile, |
| jni.JniCallType.booleanType, [uRL.reference]).boolean; |
| } |
| |
| static final _id_toString1 = jni.Jni.accessors |
| .getMethodIDOf(_class.reference, r"toString", r"()Ljava/lang/String;"); |
| |
| /// from: public java.lang.String toString() |
| /// The returned object must be deleted after use, by calling the `delete` method. |
| jni.JString toString1() { |
| return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( |
| reference, _id_toString1, jni.JniCallType.objectType, []).object); |
| } |
| |
| static final _id_toExternalForm = jni.Jni.accessors.getMethodIDOf( |
| _class.reference, r"toExternalForm", r"()Ljava/lang/String;"); |
| |
| /// from: public java.lang.String toExternalForm() |
| /// The returned object must be deleted after use, by calling the `delete` method. |
| jni.JString toExternalForm() { |
| return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( |
| reference, _id_toExternalForm, jni.JniCallType.objectType, []).object); |
| } |
| |
| static final _id_toURI = jni.Jni.accessors |
| .getMethodIDOf(_class.reference, r"toURI", r"()Ljava/net/URI;"); |
| |
| /// from: public java.net.URI toURI() |
| /// The returned object must be deleted after use, by calling the `delete` method. |
| jni.JObject toURI() { |
| return const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( |
| reference, _id_toURI, jni.JniCallType.objectType, []).object); |
| } |
| |
| static final _id_openConnection = jni.Jni.accessors.getMethodIDOf( |
| _class.reference, r"openConnection", r"()Ljava/net/URLConnection;"); |
| |
| /// from: public java.net.URLConnection openConnection() |
| /// The returned object must be deleted after use, by calling the `delete` method. |
| urlconnection_.URLConnection openConnection() { |
| return const urlconnection_.$URLConnectionType().fromRef(jni.Jni.accessors |
| .callMethodWithArgs(reference, _id_openConnection, |
| jni.JniCallType.objectType, []).object); |
| } |
| |
| static final _id_openConnection1 = jni.Jni.accessors.getMethodIDOf( |
| _class.reference, |
| r"openConnection", |
| r"(Ljava/net/Proxy;)Ljava/net/URLConnection;"); |
| |
| /// from: public java.net.URLConnection openConnection(java.net.Proxy proxy) |
| /// The returned object must be deleted after use, by calling the `delete` method. |
| urlconnection_.URLConnection openConnection1( |
| jni.JObject proxy, |
| ) { |
| return const urlconnection_.$URLConnectionType().fromRef(jni.Jni.accessors |
| .callMethodWithArgs(reference, _id_openConnection1, |
| jni.JniCallType.objectType, [proxy.reference]).object); |
| } |
| |
| static final _id_openStream = jni.Jni.accessors.getMethodIDOf( |
| _class.reference, r"openStream", r"()Ljava/io/InputStream;"); |
| |
| /// from: public final java.io.InputStream openStream() |
| /// The returned object must be deleted after use, by calling the `delete` method. |
| inputstream_.InputStream openStream() { |
| return const inputstream_.$InputStreamType().fromRef(jni.Jni.accessors |
| .callMethodWithArgs( |
| reference, _id_openStream, jni.JniCallType.objectType, []).object); |
| } |
| |
| static final _id_getContent = jni.Jni.accessors |
| .getMethodIDOf(_class.reference, r"getContent", r"()Ljava/lang/Object;"); |
| |
| /// from: public final java.lang.Object getContent() |
| /// The returned object must be deleted after use, by calling the `delete` method. |
| jni.JObject getContent() { |
| return const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( |
| reference, _id_getContent, jni.JniCallType.objectType, []).object); |
| } |
| |
| static final _id_getContent1 = jni.Jni.accessors.getMethodIDOf( |
| _class.reference, |
| r"getContent", |
| r"([Ljava/lang/Class;)Ljava/lang/Object;"); |
| |
| /// from: public final java.lang.Object getContent(java.lang.Object[] classs) |
| /// The returned object must be deleted after use, by calling the `delete` method. |
| jni.JObject getContent1( |
| jni.JArray<jni.JObject> classs, |
| ) { |
| return const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( |
| reference, |
| _id_getContent1, |
| jni.JniCallType.objectType, |
| [classs.reference]).object); |
| } |
| |
| static final _id_setURLStreamHandlerFactory = jni.Jni.accessors |
| .getStaticMethodIDOf(_class.reference, r"setURLStreamHandlerFactory", |
| r"(Ljava/net/URLStreamHandlerFactory;)V"); |
| |
| /// from: static public void setURLStreamHandlerFactory(java.net.URLStreamHandlerFactory uRLStreamHandlerFactory) |
| static void setURLStreamHandlerFactory( |
| jni.JObject uRLStreamHandlerFactory, |
| ) { |
| return jni.Jni.accessors.callStaticMethodWithArgs( |
| _class.reference, |
| _id_setURLStreamHandlerFactory, |
| jni.JniCallType.voidType, |
| [uRLStreamHandlerFactory.reference]).check(); |
| } |
| } |
| |
| class $URLType extends jni.JObjType<URL> { |
| const $URLType(); |
| |
| @override |
| String get signature => r"Ljava/net/URL;"; |
| |
| @override |
| URL fromRef(jni.JObjectPtr ref) => URL.fromRef(ref); |
| |
| @override |
| jni.JObjType get superType => const jni.JObjectType(); |
| |
| @override |
| final superCount = 1; |
| |
| @override |
| int get hashCode => ($URLType).hashCode; |
| |
| @override |
| bool operator ==(Object other) { |
| return other.runtimeType == ($URLType) && other is $URLType; |
| } |
| } |