From 6c4fbda50d95b86f9aaa41504016a7a8d888f724 Mon Sep 17 00:00:00 2001 From: James Williams <66931+jwill@users.noreply.github.com> Date: Tue, 9 Sep 2025 20:21:14 -0700 Subject: [PATCH 1/3] Native interop demo calling JS code. --- .gitignore | 1 + graalvm_test/.gitignore | 3 + graalvm_test/README.md | 53 + graalvm_test/analysis_options.yaml | 30 + graalvm_test/bin/graalvm_test.dart | 35 + graalvm_test/jnigen.yaml | 12 + .../graal/org/graalvm/polyglot/Context.dart | 2130 ++++++++++ .../lib/graal/org/graalvm/polyglot/Value.dart | 3680 +++++++++++++++++ .../graal/org/graalvm/polyglot/_package.dart | 3 + graalvm_test/lib/graalvm_test.dart | 3 + graalvm_test/pubspec.yaml | 17 + 11 files changed, 5967 insertions(+) create mode 100644 graalvm_test/.gitignore create mode 100644 graalvm_test/README.md create mode 100644 graalvm_test/analysis_options.yaml create mode 100644 graalvm_test/bin/graalvm_test.dart create mode 100644 graalvm_test/jnigen.yaml create mode 100644 graalvm_test/lib/graal/org/graalvm/polyglot/Context.dart create mode 100644 graalvm_test/lib/graal/org/graalvm/polyglot/Value.dart create mode 100644 graalvm_test/lib/graal/org/graalvm/polyglot/_package.dart create mode 100644 graalvm_test/lib/graalvm_test.dart create mode 100644 graalvm_test/pubspec.yaml diff --git a/.gitignore b/.gitignore index 1af98a5..ecadb3f 100644 --- a/.gitignore +++ b/.gitignore @@ -82,3 +82,4 @@ yarn.lock !**/ios/**/default.pbxuser !**/ios/**/default.perspectivev3 !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages +/graalvm_test/build diff --git a/graalvm_test/.gitignore b/graalvm_test/.gitignore new file mode 100644 index 0000000..3a85790 --- /dev/null +++ b/graalvm_test/.gitignore @@ -0,0 +1,3 @@ +# https://dart.dev/guides/libraries/private-files +# Created by `dart pub` +.dart_tool/ diff --git a/graalvm_test/README.md b/graalvm_test/README.md new file mode 100644 index 0000000..38fb7d1 --- /dev/null +++ b/graalvm_test/README.md @@ -0,0 +1,53 @@ +# GraalVM Test + +This is a sample command-line application demonstrating how to use Dart's Java Native Interface (JNI) packages +(`jni` and `jnigen`) to interoperate with Java code, specifically the GraalVM Polyglot API. + +The application initializes a Java Virtual Machine (JVM) within a Dart environment, loads the necessary GraalVM JAR +files, and then executes a simple JavaScript snippet using GraalVM's polyglot capabilities. + +## How it Works + +The core logic is in `bin/graalvm_test.dart`. It performs the following steps: + +1. **Spawns a JVM**: It uses `Jni.spawn()` to start a JVM, providing the paths to the required GraalVM JAR files +located in the `mvn_jar` directory. +2. **Creates a Polyglot Context**: It creates a GraalVM `Context` for the JavaScript language. +3. **Executes JavaScript**: It evaluates a JavaScript string that defines a simple function. +4. **Interoperates**: It calls the JavaScript function from Dart, passing a string argument ("World") to it. +The JavaScript code then prints a message to the console. + +The Dart bindings for the GraalVM Polyglot API (`org.graalvm.polyglot.Context` and `org.graalvm.polyglot.Value`) are +generated by `jnigen` based on the configuration in `jnigen.yaml` and the Java source files in `mvn_java`. + +## Requirements + +* Dart SDK +* Java Development Kit (JDK) 17 + +## Setup + +1. **Get dependencies**: + ```bash + dart pub get + ``` + +2. **Generate JNI bindings**: + This project uses `jnigen` to generate the Dart code for Java classes. + Run the following command to generate the necessary files: + ```bash + dart run jni:setup + dart run jnigen:setup + dart run jnigen --config jnigen.yaml + ``` + The underlying graalvm libraries require OpenJDK 17 or higher. + +## Running the Application + +After completing the setup steps, run the application with the following command: + +```bash +dart run bin/graalvm_test.dart +``` + +You should see output from both Dart and the executed JavaScript code in your console. \ No newline at end of file diff --git a/graalvm_test/analysis_options.yaml b/graalvm_test/analysis_options.yaml new file mode 100644 index 0000000..dee8927 --- /dev/null +++ b/graalvm_test/analysis_options.yaml @@ -0,0 +1,30 @@ +# This file configures the static analysis results for your project (errors, +# warnings, and lints). +# +# This enables the 'recommended' set of lints from `package:lints`. +# This set helps identify many issues that may lead to problems when running +# or consuming Dart code, and enforces writing Dart using a single, idiomatic +# style and format. +# +# If you want a smaller set of lints you can change this to specify +# 'package:lints/core.yaml'. These are just the most critical lints +# (the recommended set includes the core lints). +# The core lints are also what is used by pub.dev for scoring packages. + +include: package:lints/recommended.yaml + +# Uncomment the following section to specify additional rules. + +# linter: +# rules: +# - camel_case_types + +# analyzer: +# exclude: +# - path/to/excluded/files/** + +# For more information about the core and recommended set of lints, see +# https://dart.dev/go/core-lints + +# For additional information about configuring this file, see +# https://dart.dev/guides/language/analysis-options diff --git a/graalvm_test/bin/graalvm_test.dart b/graalvm_test/bin/graalvm_test.dart new file mode 100644 index 0000000..b6293e2 --- /dev/null +++ b/graalvm_test/bin/graalvm_test.dart @@ -0,0 +1,35 @@ +import 'package:jni/jni.dart'; +import 'package:path/path.dart'; +import 'package:graalvm_test/graal/org/graalvm/polyglot/_package.dart' as graal; + +void main(List arguments) { + Jni.spawn( + dylibDir: join('build', 'jni_libs'), + classPath: [ + './mvn_jar/collections-24.2.2.jar', + './mvn_jar/icu4j-24.2.2.jar', + './mvn_jar/jniutils-24.2.2.jar', + './mvn_jar/js-language-24.2.2.jar', + './mvn_jar/nativebridge-24.2.2.jar', + './mvn_jar/nativeimage-24.2.2.jar', + './mvn_jar/polyglot-24.2.2.jar', + './mvn_jar/regex-24.2.2.jar', + './mvn_jar/truffle-api-24.2.2.jar', + './mvn_jar/truffle-compiler-24.2.2.jar', + './mvn_jar/truffle-enterprise-24.2.2.jar', + './mvn_jar/truffle-runtime-24.2.2.jar', + './mvn_jar/word-24.2.2.jar', + './mvn_jar/xz-24.2.2.jar' + ], + ); + + var jsCode = "(function myFun(param){console.log('Hello ' + param + ' from JS');})"; + + var langs = JArray.of(JString.type, ["js".toJString()]); + var context = graal.Context.create(langs); + var value = context?.eval$1("js".toJString(), jsCode.toJString()); + print(value); + value?.execute(JArray.of(JString.type, ["World".toJString()])); + return; +} + diff --git a/graalvm_test/jnigen.yaml b/graalvm_test/jnigen.yaml new file mode 100644 index 0000000..09f367c --- /dev/null +++ b/graalvm_test/jnigen.yaml @@ -0,0 +1,12 @@ +output: + dart: + path: lib/graal/ + +classes: + - 'org.graalvm.polyglot.Context' + - 'org.graalvm.polyglot.Value' + +maven_downloads: + jar_only_deps: + - 'org.graalvm.polyglot:polyglot:24.2.1' + - 'org.graalvm.polyglot:js:24.2.2' diff --git a/graalvm_test/lib/graal/org/graalvm/polyglot/Context.dart b/graalvm_test/lib/graal/org/graalvm/polyglot/Context.dart new file mode 100644 index 0000000..0c7f3d0 --- /dev/null +++ b/graalvm_test/lib/graal/org/graalvm/polyglot/Context.dart @@ -0,0 +1,2130 @@ +// AUTO GENERATED BY JNIGEN 0.14.2. 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 +// ignore_for_file: comment_references +// ignore_for_file: doc_directive_unknown +// ignore_for_file: file_names +// ignore_for_file: inference_failure_on_untyped_parameter +// ignore_for_file: invalid_internal_annotation +// ignore_for_file: invalid_use_of_internal_member +// ignore_for_file: library_prefixes +// ignore_for_file: lines_longer_than_80_chars +// ignore_for_file: no_leading_underscores_for_library_prefixes +// 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: unintended_html_in_doc_comment +// ignore_for_file: unnecessary_cast +// ignore_for_file: unnecessary_non_null_assertion +// ignore_for_file: unnecessary_parenthesis +// ignore_for_file: unused_element +// ignore_for_file: unused_field +// ignore_for_file: unused_import +// ignore_for_file: unused_local_variable +// ignore_for_file: unused_shown_name +// ignore_for_file: use_super_parameters + +import 'dart:core' show Object, String, bool, double, int; +import 'dart:core' as core$_; + +import 'package:jni/_internal.dart' as jni$_; +import 'package:jni/jni.dart' as jni$_; + +import 'Value.dart' as value$_; + +/// from: `org.graalvm.polyglot.Context$Builder` +class Context$Builder extends jni$_.JObject { + @jni$_.internal + @core$_.override + final jni$_.JObjType $type; + + @jni$_.internal + Context$Builder.fromReference(jni$_.JReference reference) + : $type = type, + super.fromReference(reference); + + static final _class = jni$_.JClass.forName( + r'org/graalvm/polyglot/Context$Builder', + ); + + /// The type which includes information such as the signature of this class. + static const nullableType = $Context$Builder$NullableType(); + static const type = $Context$Builder$Type(); + static final _id_engine = _class.instanceMethodId( + r'engine', + r'(Lorg/graalvm/polyglot/Engine;)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _engine = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder engine(org.graalvm.polyglot.Engine engine)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? engine(jni$_.JObject? engine) { + final _$engine = engine?.reference ?? jni$_.jNullReference; + return _engine( + reference.pointer, + _id_engine as jni$_.JMethodIDPtr, + _$engine.pointer, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_out = _class.instanceMethodId( + r'out', + r'(Ljava/io/OutputStream;)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _out = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder out(java.io.OutputStream out)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? out(jni$_.JObject? out) { + final _$out = out?.reference ?? jni$_.jNullReference; + return _out( + reference.pointer, + _id_out as jni$_.JMethodIDPtr, + _$out.pointer, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_err = _class.instanceMethodId( + r'err', + r'(Ljava/io/OutputStream;)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _err = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder err(java.io.OutputStream err)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? err(jni$_.JObject? err) { + final _$err = err?.reference ?? jni$_.jNullReference; + return _err( + reference.pointer, + _id_err as jni$_.JMethodIDPtr, + _$err.pointer, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_in$ = _class.instanceMethodId( + r'in', + r'(Ljava/io/InputStream;)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _in$ = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder in(java.io.InputStream in)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? in$(jni$_.JObject? in$) { + final _$in$ = in$?.reference ?? jni$_.jNullReference; + return _in$( + reference.pointer, + _id_in$ as jni$_.JMethodIDPtr, + _$in$.pointer, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_allowHostAccess = _class.instanceMethodId( + r'allowHostAccess', + r'(Z)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _allowHostAccess = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int32,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + int, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder allowHostAccess(boolean enabled)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? allowHostAccess(bool enabled) { + return _allowHostAccess( + reference.pointer, + _id_allowHostAccess as jni$_.JMethodIDPtr, + enabled ? 1 : 0, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_allowHostAccess$1 = _class.instanceMethodId( + r'allowHostAccess', + r'(Lorg/graalvm/polyglot/HostAccess;)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _allowHostAccess$1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder allowHostAccess(org.graalvm.polyglot.HostAccess config)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? allowHostAccess$1(jni$_.JObject? config) { + final _$config = config?.reference ?? jni$_.jNullReference; + return _allowHostAccess$1( + reference.pointer, + _id_allowHostAccess$1 as jni$_.JMethodIDPtr, + _$config.pointer, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_allowNativeAccess = _class.instanceMethodId( + r'allowNativeAccess', + r'(Z)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _allowNativeAccess = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int32,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + int, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder allowNativeAccess(boolean enabled)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? allowNativeAccess(bool enabled) { + return _allowNativeAccess( + reference.pointer, + _id_allowNativeAccess as jni$_.JMethodIDPtr, + enabled ? 1 : 0, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_allowCreateThread = _class.instanceMethodId( + r'allowCreateThread', + r'(Z)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _allowCreateThread = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int32,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + int, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder allowCreateThread(boolean enabled)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? allowCreateThread(bool enabled) { + return _allowCreateThread( + reference.pointer, + _id_allowCreateThread as jni$_.JMethodIDPtr, + enabled ? 1 : 0, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_allowAllAccess = _class.instanceMethodId( + r'allowAllAccess', + r'(Z)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _allowAllAccess = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int32,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + int, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder allowAllAccess(boolean enabled)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? allowAllAccess(bool enabled) { + return _allowAllAccess( + reference.pointer, + _id_allowAllAccess as jni$_.JMethodIDPtr, + enabled ? 1 : 0, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_allowHostClassLoading = _class.instanceMethodId( + r'allowHostClassLoading', + r'(Z)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _allowHostClassLoading = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int32,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + int, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder allowHostClassLoading(boolean enabled)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? allowHostClassLoading(bool enabled) { + return _allowHostClassLoading( + reference.pointer, + _id_allowHostClassLoading as jni$_.JMethodIDPtr, + enabled ? 1 : 0, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_allowHostClassLookup = _class.instanceMethodId( + r'allowHostClassLookup', + r'(Ljava/util/function/Predicate;)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _allowHostClassLookup = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder allowHostClassLookup(java.util.function.Predicate classFilter)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? allowHostClassLookup(jni$_.JObject? classFilter) { + final _$classFilter = classFilter?.reference ?? jni$_.jNullReference; + return _allowHostClassLookup( + reference.pointer, + _id_allowHostClassLookup as jni$_.JMethodIDPtr, + _$classFilter.pointer, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_allowExperimentalOptions = _class.instanceMethodId( + r'allowExperimentalOptions', + r'(Z)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _allowExperimentalOptions = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int32,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + int, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder allowExperimentalOptions(boolean enabled)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? allowExperimentalOptions(bool enabled) { + return _allowExperimentalOptions( + reference.pointer, + _id_allowExperimentalOptions as jni$_.JMethodIDPtr, + enabled ? 1 : 0, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_allowPolyglotAccess = _class.instanceMethodId( + r'allowPolyglotAccess', + r'(Lorg/graalvm/polyglot/PolyglotAccess;)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _allowPolyglotAccess = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder allowPolyglotAccess(org.graalvm.polyglot.PolyglotAccess accessPolicy)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? allowPolyglotAccess(jni$_.JObject? accessPolicy) { + final _$accessPolicy = accessPolicy?.reference ?? jni$_.jNullReference; + return _allowPolyglotAccess( + reference.pointer, + _id_allowPolyglotAccess as jni$_.JMethodIDPtr, + _$accessPolicy.pointer, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_allowValueSharing = _class.instanceMethodId( + r'allowValueSharing', + r'(Z)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _allowValueSharing = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int32,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + int, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder allowValueSharing(boolean enabled)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? allowValueSharing(bool enabled) { + return _allowValueSharing( + reference.pointer, + _id_allowValueSharing as jni$_.JMethodIDPtr, + enabled ? 1 : 0, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_allowInnerContextOptions = _class.instanceMethodId( + r'allowInnerContextOptions', + r'(Z)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _allowInnerContextOptions = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int32,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + int, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder allowInnerContextOptions(boolean enabled)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? allowInnerContextOptions(bool enabled) { + return _allowInnerContextOptions( + reference.pointer, + _id_allowInnerContextOptions as jni$_.JMethodIDPtr, + enabled ? 1 : 0, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_hostClassFilter = _class.instanceMethodId( + r'hostClassFilter', + r'(Ljava/util/function/Predicate;)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _hostClassFilter = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder hostClassFilter(java.util.function.Predicate classFilter)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? hostClassFilter(jni$_.JObject? classFilter) { + final _$classFilter = classFilter?.reference ?? jni$_.jNullReference; + return _hostClassFilter( + reference.pointer, + _id_hostClassFilter as jni$_.JMethodIDPtr, + _$classFilter.pointer, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_option = _class.instanceMethodId( + r'option', + r'(Ljava/lang/String;Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _option = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder option(java.lang.String key, java.lang.String value)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? option(jni$_.JString? key, jni$_.JString? value) { + final _$key = key?.reference ?? jni$_.jNullReference; + final _$value = value?.reference ?? jni$_.jNullReference; + return _option( + reference.pointer, + _id_option as jni$_.JMethodIDPtr, + _$key.pointer, + _$value.pointer, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_options = _class.instanceMethodId( + r'options', + r'(Ljava/util/Map;)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _options = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder options(java.util.Map options)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? options( + jni$_.JMap? options, + ) { + final _$options = options?.reference ?? jni$_.jNullReference; + return _options( + reference.pointer, + _id_options as jni$_.JMethodIDPtr, + _$options.pointer, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_arguments = _class.instanceMethodId( + r'arguments', + r'(Ljava/lang/String;[Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _arguments = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder arguments(java.lang.String language, java.lang.String[] args)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? arguments( + jni$_.JString? language, + jni$_.JArray? args, + ) { + final _$language = language?.reference ?? jni$_.jNullReference; + final _$args = args?.reference ?? jni$_.jNullReference; + return _arguments( + reference.pointer, + _id_arguments as jni$_.JMethodIDPtr, + _$language.pointer, + _$args.pointer, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_allowIO = _class.instanceMethodId( + r'allowIO', + r'(Lorg/graalvm/polyglot/io/IOAccess;)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _allowIO = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder allowIO(org.graalvm.polyglot.io.IOAccess ioAccess)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? allowIO(jni$_.JObject? ioAccess) { + final _$ioAccess = ioAccess?.reference ?? jni$_.jNullReference; + return _allowIO( + reference.pointer, + _id_allowIO as jni$_.JMethodIDPtr, + _$ioAccess.pointer, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_allowIO$1 = _class.instanceMethodId( + r'allowIO', + r'(Z)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _allowIO$1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int32,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + int, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder allowIO(boolean enabled)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? allowIO$1(bool enabled) { + return _allowIO$1( + reference.pointer, + _id_allowIO$1 as jni$_.JMethodIDPtr, + enabled ? 1 : 0, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_fileSystem = _class.instanceMethodId( + r'fileSystem', + r'(Lorg/graalvm/polyglot/io/FileSystem;)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _fileSystem = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder fileSystem(org.graalvm.polyglot.io.FileSystem fileSystem)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? fileSystem(jni$_.JObject? fileSystem) { + final _$fileSystem = fileSystem?.reference ?? jni$_.jNullReference; + return _fileSystem( + reference.pointer, + _id_fileSystem as jni$_.JMethodIDPtr, + _$fileSystem.pointer, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_serverTransport = _class.instanceMethodId( + r'serverTransport', + r'(Lorg/graalvm/polyglot/io/MessageTransport;)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _serverTransport = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder serverTransport(org.graalvm.polyglot.io.MessageTransport serverTransport)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? serverTransport(jni$_.JObject? serverTransport) { + final _$serverTransport = + serverTransport?.reference ?? jni$_.jNullReference; + return _serverTransport( + reference.pointer, + _id_serverTransport as jni$_.JMethodIDPtr, + _$serverTransport.pointer, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_logHandler = _class.instanceMethodId( + r'logHandler', + r'(Ljava/util/logging/Handler;)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _logHandler = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder logHandler(java.util.logging.Handler logHandler)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? logHandler(jni$_.JObject? logHandler) { + final _$logHandler = logHandler?.reference ?? jni$_.jNullReference; + return _logHandler( + reference.pointer, + _id_logHandler as jni$_.JMethodIDPtr, + _$logHandler.pointer, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_timeZone = _class.instanceMethodId( + r'timeZone', + r'(Ljava/time/ZoneId;)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _timeZone = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder timeZone(java.time.ZoneId zone)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? timeZone(jni$_.JObject? zone) { + final _$zone = zone?.reference ?? jni$_.jNullReference; + return _timeZone( + reference.pointer, + _id_timeZone as jni$_.JMethodIDPtr, + _$zone.pointer, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_logHandler$1 = _class.instanceMethodId( + r'logHandler', + r'(Ljava/io/OutputStream;)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _logHandler$1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder logHandler(java.io.OutputStream logOut)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? logHandler$1(jni$_.JObject? logOut) { + final _$logOut = logOut?.reference ?? jni$_.jNullReference; + return _logHandler$1( + reference.pointer, + _id_logHandler$1 as jni$_.JMethodIDPtr, + _$logOut.pointer, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_allowCreateProcess = _class.instanceMethodId( + r'allowCreateProcess', + r'(Z)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _allowCreateProcess = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int32,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + int, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder allowCreateProcess(boolean enabled)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? allowCreateProcess(bool enabled) { + return _allowCreateProcess( + reference.pointer, + _id_allowCreateProcess as jni$_.JMethodIDPtr, + enabled ? 1 : 0, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_processHandler = _class.instanceMethodId( + r'processHandler', + r'(Lorg/graalvm/polyglot/io/ProcessHandler;)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _processHandler = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder processHandler(org.graalvm.polyglot.io.ProcessHandler handler)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? processHandler(jni$_.JObject? handler) { + final _$handler = handler?.reference ?? jni$_.jNullReference; + return _processHandler( + reference.pointer, + _id_processHandler as jni$_.JMethodIDPtr, + _$handler.pointer, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_resourceLimits = _class.instanceMethodId( + r'resourceLimits', + r'(Lorg/graalvm/polyglot/ResourceLimits;)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _resourceLimits = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder resourceLimits(org.graalvm.polyglot.ResourceLimits limits)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? resourceLimits(jni$_.JObject? limits) { + final _$limits = limits?.reference ?? jni$_.jNullReference; + return _resourceLimits( + reference.pointer, + _id_resourceLimits as jni$_.JMethodIDPtr, + _$limits.pointer, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_sandbox = _class.instanceMethodId( + r'sandbox', + r'(Lorg/graalvm/polyglot/SandboxPolicy;)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _sandbox = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder sandbox(org.graalvm.polyglot.SandboxPolicy policy)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? sandbox(jni$_.JObject? policy) { + final _$policy = policy?.reference ?? jni$_.jNullReference; + return _sandbox( + reference.pointer, + _id_sandbox as jni$_.JMethodIDPtr, + _$policy.pointer, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_allowEnvironmentAccess = _class.instanceMethodId( + r'allowEnvironmentAccess', + r'(Lorg/graalvm/polyglot/EnvironmentAccess;)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _allowEnvironmentAccess = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder allowEnvironmentAccess(org.graalvm.polyglot.EnvironmentAccess accessPolicy)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? allowEnvironmentAccess(jni$_.JObject? accessPolicy) { + final _$accessPolicy = accessPolicy?.reference ?? jni$_.jNullReference; + return _allowEnvironmentAccess( + reference.pointer, + _id_allowEnvironmentAccess as jni$_.JMethodIDPtr, + _$accessPolicy.pointer, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_environment = _class.instanceMethodId( + r'environment', + r'(Ljava/lang/String;Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _environment = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder environment(java.lang.String name, java.lang.String value)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? environment(jni$_.JString? name, jni$_.JString? value) { + final _$name = name?.reference ?? jni$_.jNullReference; + final _$value = value?.reference ?? jni$_.jNullReference; + return _environment( + reference.pointer, + _id_environment as jni$_.JMethodIDPtr, + _$name.pointer, + _$value.pointer, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_environment$1 = _class.instanceMethodId( + r'environment', + r'(Ljava/util/Map;)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _environment$1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder environment(java.util.Map env)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? environment$1( + jni$_.JMap? env, + ) { + final _$env = env?.reference ?? jni$_.jNullReference; + return _environment$1( + reference.pointer, + _id_environment$1 as jni$_.JMethodIDPtr, + _$env.pointer, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_currentWorkingDirectory = _class.instanceMethodId( + r'currentWorkingDirectory', + r'(Ljava/nio/file/Path;)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _currentWorkingDirectory = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder currentWorkingDirectory(java.nio.file.Path workingDirectory)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? currentWorkingDirectory(jni$_.JObject? workingDirectory) { + final _$workingDirectory = + workingDirectory?.reference ?? jni$_.jNullReference; + return _currentWorkingDirectory( + reference.pointer, + _id_currentWorkingDirectory as jni$_.JMethodIDPtr, + _$workingDirectory.pointer, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_hostClassLoader = _class.instanceMethodId( + r'hostClassLoader', + r'(Ljava/lang/ClassLoader;)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _hostClassLoader = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder hostClassLoader(java.lang.ClassLoader classLoader)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? hostClassLoader(jni$_.JObject? classLoader) { + final _$classLoader = classLoader?.reference ?? jni$_.jNullReference; + return _hostClassLoader( + reference.pointer, + _id_hostClassLoader as jni$_.JMethodIDPtr, + _$classLoader.pointer, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_useSystemExit = _class.instanceMethodId( + r'useSystemExit', + r'(Z)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _useSystemExit = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int32,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + int, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context$Builder useSystemExit(boolean enabled)` + /// The returned object must be released after use, by calling the [release] method. + Context$Builder? useSystemExit(bool enabled) { + return _useSystemExit( + reference.pointer, + _id_useSystemExit as jni$_.JMethodIDPtr, + enabled ? 1 : 0, + ).object(const $Context$Builder$NullableType()); + } + + static final _id_build = _class.instanceMethodId( + r'build', + r'()Lorg/graalvm/polyglot/Context;', + ); + + static final _build = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context build()` + /// The returned object must be released after use, by calling the [release] method. + Context? build() { + return _build( + reference.pointer, + _id_build as jni$_.JMethodIDPtr, + ).object(const $Context$NullableType()); + } +} + +final class $Context$Builder$NullableType + extends jni$_.JObjType { + @jni$_.internal + const $Context$Builder$NullableType(); + + @jni$_.internal + @core$_.override + String get signature => r'Lorg/graalvm/polyglot/Context$Builder;'; + + @jni$_.internal + @core$_.override + Context$Builder? fromReference(jni$_.JReference reference) => + reference.isNull ? null : Context$Builder.fromReference(reference); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectNullableType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => this; + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($Context$Builder$NullableType).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($Context$Builder$NullableType) && + other is $Context$Builder$NullableType; + } +} + +final class $Context$Builder$Type extends jni$_.JObjType { + @jni$_.internal + const $Context$Builder$Type(); + + @jni$_.internal + @core$_.override + String get signature => r'Lorg/graalvm/polyglot/Context$Builder;'; + + @jni$_.internal + @core$_.override + Context$Builder fromReference(jni$_.JReference reference) => + Context$Builder.fromReference(reference); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectNullableType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => + const $Context$Builder$NullableType(); + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($Context$Builder$Type).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($Context$Builder$Type) && + other is $Context$Builder$Type; + } +} + +/// from: `org.graalvm.polyglot.Context` +class Context extends jni$_.JObject { + @jni$_.internal + @core$_.override + final jni$_.JObjType $type; + + @jni$_.internal + Context.fromReference(jni$_.JReference reference) + : $type = type, + super.fromReference(reference); + + static final _class = jni$_.JClass.forName(r'org/graalvm/polyglot/Context'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $Context$NullableType(); + static const type = $Context$Type(); + static final _id_getEngine = _class.instanceMethodId( + r'getEngine', + r'()Lorg/graalvm/polyglot/Engine;', + ); + + static final _getEngine = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public org.graalvm.polyglot.Engine getEngine()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? getEngine() { + return _getEngine( + reference.pointer, + _id_getEngine as jni$_.JMethodIDPtr, + ).object(const jni$_.JObjectNullableType()); + } + + static final _id_eval = _class.instanceMethodId( + r'eval', + r'(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;', + ); + + static final _eval = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Value eval(org.graalvm.polyglot.Source source)` + /// The returned object must be released after use, by calling the [release] method. + value$_.Value? eval(jni$_.JObject? source) { + final _$source = source?.reference ?? jni$_.jNullReference; + return _eval( + reference.pointer, + _id_eval as jni$_.JMethodIDPtr, + _$source.pointer, + ).object(const value$_.$Value$NullableType()); + } + + static final _id_eval$1 = _class.instanceMethodId( + r'eval', + r'(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;', + ); + + static final _eval$1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Value eval(java.lang.String languageId, java.lang.CharSequence source)` + /// The returned object must be released after use, by calling the [release] method. + value$_.Value? eval$1(jni$_.JString? languageId, jni$_.JObject? source) { + final _$languageId = languageId?.reference ?? jni$_.jNullReference; + final _$source = source?.reference ?? jni$_.jNullReference; + return _eval$1( + reference.pointer, + _id_eval$1 as jni$_.JMethodIDPtr, + _$languageId.pointer, + _$source.pointer, + ).object(const value$_.$Value$NullableType()); + } + + static final _id_parse = _class.instanceMethodId( + r'parse', + r'(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;', + ); + + static final _parse = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Value parse(org.graalvm.polyglot.Source source)` + /// The returned object must be released after use, by calling the [release] method. + value$_.Value? parse(jni$_.JObject? source) { + final _$source = source?.reference ?? jni$_.jNullReference; + return _parse( + reference.pointer, + _id_parse as jni$_.JMethodIDPtr, + _$source.pointer, + ).object(const value$_.$Value$NullableType()); + } + + static final _id_parse$1 = _class.instanceMethodId( + r'parse', + r'(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;', + ); + + static final _parse$1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Value parse(java.lang.String languageId, java.lang.CharSequence source)` + /// The returned object must be released after use, by calling the [release] method. + value$_.Value? parse$1(jni$_.JString? languageId, jni$_.JObject? source) { + final _$languageId = languageId?.reference ?? jni$_.jNullReference; + final _$source = source?.reference ?? jni$_.jNullReference; + return _parse$1( + reference.pointer, + _id_parse$1 as jni$_.JMethodIDPtr, + _$languageId.pointer, + _$source.pointer, + ).object(const value$_.$Value$NullableType()); + } + + static final _id_getPolyglotBindings = _class.instanceMethodId( + r'getPolyglotBindings', + r'()Lorg/graalvm/polyglot/Value;', + ); + + static final _getPolyglotBindings = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public org.graalvm.polyglot.Value getPolyglotBindings()` + /// The returned object must be released after use, by calling the [release] method. + value$_.Value? getPolyglotBindings() { + return _getPolyglotBindings( + reference.pointer, + _id_getPolyglotBindings as jni$_.JMethodIDPtr, + ).object(const value$_.$Value$NullableType()); + } + + static final _id_getBindings = _class.instanceMethodId( + r'getBindings', + r'(Ljava/lang/String;)Lorg/graalvm/polyglot/Value;', + ); + + static final _getBindings = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Value getBindings(java.lang.String languageId)` + /// The returned object must be released after use, by calling the [release] method. + value$_.Value? getBindings(jni$_.JString? languageId) { + final _$languageId = languageId?.reference ?? jni$_.jNullReference; + return _getBindings( + reference.pointer, + _id_getBindings as jni$_.JMethodIDPtr, + _$languageId.pointer, + ).object(const value$_.$Value$NullableType()); + } + + static final _id_initialize = _class.instanceMethodId( + r'initialize', + r'(Ljava/lang/String;)Z', + ); + + static final _initialize = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public boolean initialize(java.lang.String languageId)` + bool initialize(jni$_.JString? languageId) { + final _$languageId = languageId?.reference ?? jni$_.jNullReference; + return _initialize( + reference.pointer, + _id_initialize as jni$_.JMethodIDPtr, + _$languageId.pointer, + ).boolean; + } + + static final _id_resetLimits = _class.instanceMethodId( + r'resetLimits', + r'()V', + ); + + static final _resetLimits = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public void resetLimits()` + void resetLimits() { + _resetLimits( + reference.pointer, + _id_resetLimits as jni$_.JMethodIDPtr, + ).check(); + } + + static final _id_asValue = _class.instanceMethodId( + r'asValue', + r'(Ljava/lang/Object;)Lorg/graalvm/polyglot/Value;', + ); + + static final _asValue = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Value asValue(java.lang.Object hostValue)` + /// The returned object must be released after use, by calling the [release] method. + value$_.Value? asValue(jni$_.JObject? hostValue) { + final _$hostValue = hostValue?.reference ?? jni$_.jNullReference; + return _asValue( + reference.pointer, + _id_asValue as jni$_.JMethodIDPtr, + _$hostValue.pointer, + ).object(const value$_.$Value$NullableType()); + } + + static final _id_enter = _class.instanceMethodId(r'enter', r'()V'); + + static final _enter = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public void enter()` + void enter() { + _enter(reference.pointer, _id_enter as jni$_.JMethodIDPtr).check(); + } + + static final _id_equals = _class.instanceMethodId( + r'equals', + r'(Ljava/lang/Object;)Z', + ); + + static final _equals = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public boolean equals(java.lang.Object obj)` + bool equals(jni$_.JObject? obj) { + final _$obj = obj?.reference ?? jni$_.jNullReference; + return _equals( + reference.pointer, + _id_equals as jni$_.JMethodIDPtr, + _$obj.pointer, + ).boolean; + } + + static final _id_hashCode$1 = _class.instanceMethodId(r'hashCode', r'()I'); + + static final _hashCode$1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallIntMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public int hashCode()` + int hashCode$1() { + return _hashCode$1( + reference.pointer, + _id_hashCode$1 as jni$_.JMethodIDPtr, + ).integer; + } + + static final _id_leave = _class.instanceMethodId(r'leave', r'()V'); + + static final _leave = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public void leave()` + void leave() { + _leave(reference.pointer, _id_leave as jni$_.JMethodIDPtr).check(); + } + + static final _id_close = _class.instanceMethodId(r'close', r'(Z)V'); + + static final _close = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int32,)>, + ) + > + >('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + int, + ) + >(); + + /// from: `public void close(boolean cancelIfExecuting)` + void close(bool cancelIfExecuting) { + _close( + reference.pointer, + _id_close as jni$_.JMethodIDPtr, + cancelIfExecuting ? 1 : 0, + ).check(); + } + + static final _id_close$1 = _class.instanceMethodId(r'close', r'()V'); + + static final _close$1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public void close()` + void close$1() { + _close$1(reference.pointer, _id_close$1 as jni$_.JMethodIDPtr).check(); + } + + static final _id_interrupt = _class.instanceMethodId( + r'interrupt', + r'(Ljava/time/Duration;)V', + ); + + static final _interrupt = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public void interrupt(java.time.Duration timeout)` + void interrupt(jni$_.JObject? timeout) { + final _$timeout = timeout?.reference ?? jni$_.jNullReference; + _interrupt( + reference.pointer, + _id_interrupt as jni$_.JMethodIDPtr, + _$timeout.pointer, + ).check(); + } + + static final _id_safepoint = _class.instanceMethodId(r'safepoint', r'()V'); + + static final _safepoint = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public void safepoint()` + void safepoint() { + _safepoint(reference.pointer, _id_safepoint as jni$_.JMethodIDPtr).check(); + } + + static final _id_getCurrent = _class.staticMethodId( + r'getCurrent', + r'()Lorg/graalvm/polyglot/Context;', + ); + + static final _getCurrent = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `static public org.graalvm.polyglot.Context getCurrent()` + /// The returned object must be released after use, by calling the [release] method. + static Context? getCurrent() { + return _getCurrent( + _class.reference.pointer, + _id_getCurrent as jni$_.JMethodIDPtr, + ).object(const $Context$NullableType()); + } + + static final _id_create = _class.staticMethodId( + r'create', + r'([Ljava/lang/String;)Lorg/graalvm/polyglot/Context;', + ); + + static final _create = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `static public org.graalvm.polyglot.Context create(java.lang.String[] permittedLanguages)` + /// The returned object must be released after use, by calling the [release] method. + static Context? create(jni$_.JArray? permittedLanguages) { + final _$permittedLanguages = + permittedLanguages?.reference ?? jni$_.jNullReference; + return _create( + _class.reference.pointer, + _id_create as jni$_.JMethodIDPtr, + _$permittedLanguages.pointer, + ).object(const $Context$NullableType()); + } + + static final _id_newBuilder = _class.staticMethodId( + r'newBuilder', + r'([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;', + ); + + static final _newBuilder = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `static public org.graalvm.polyglot.Context$Builder newBuilder(java.lang.String[] permittedLanguages)` + /// The returned object must be released after use, by calling the [release] method. + static Context$Builder? newBuilder( + jni$_.JArray? permittedLanguages, + ) { + final _$permittedLanguages = + permittedLanguages?.reference ?? jni$_.jNullReference; + return _newBuilder( + _class.reference.pointer, + _id_newBuilder as jni$_.JMethodIDPtr, + _$permittedLanguages.pointer, + ).object(const $Context$Builder$NullableType()); + } +} + +final class $Context$NullableType extends jni$_.JObjType { + @jni$_.internal + const $Context$NullableType(); + + @jni$_.internal + @core$_.override + String get signature => r'Lorg/graalvm/polyglot/Context;'; + + @jni$_.internal + @core$_.override + Context? fromReference(jni$_.JReference reference) => + reference.isNull ? null : Context.fromReference(reference); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectNullableType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => this; + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($Context$NullableType).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($Context$NullableType) && + other is $Context$NullableType; + } +} + +final class $Context$Type extends jni$_.JObjType { + @jni$_.internal + const $Context$Type(); + + @jni$_.internal + @core$_.override + String get signature => r'Lorg/graalvm/polyglot/Context;'; + + @jni$_.internal + @core$_.override + Context fromReference(jni$_.JReference reference) => + Context.fromReference(reference); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectNullableType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => const $Context$NullableType(); + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($Context$Type).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($Context$Type) && other is $Context$Type; + } +} diff --git a/graalvm_test/lib/graal/org/graalvm/polyglot/Value.dart b/graalvm_test/lib/graal/org/graalvm/polyglot/Value.dart new file mode 100644 index 0000000..31f9454 --- /dev/null +++ b/graalvm_test/lib/graal/org/graalvm/polyglot/Value.dart @@ -0,0 +1,3680 @@ +// AUTO GENERATED BY JNIGEN 0.14.2. 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 +// ignore_for_file: comment_references +// ignore_for_file: doc_directive_unknown +// ignore_for_file: file_names +// ignore_for_file: inference_failure_on_untyped_parameter +// ignore_for_file: invalid_internal_annotation +// ignore_for_file: invalid_use_of_internal_member +// ignore_for_file: library_prefixes +// ignore_for_file: lines_longer_than_80_chars +// ignore_for_file: no_leading_underscores_for_library_prefixes +// 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: unintended_html_in_doc_comment +// ignore_for_file: unnecessary_cast +// ignore_for_file: unnecessary_non_null_assertion +// ignore_for_file: unnecessary_parenthesis +// ignore_for_file: unused_element +// ignore_for_file: unused_field +// ignore_for_file: unused_import +// ignore_for_file: unused_local_variable +// ignore_for_file: unused_shown_name +// ignore_for_file: use_super_parameters + +import 'dart:core' show Object, String, bool, double, int; +import 'dart:core' as core$_; + +import 'package:jni/_internal.dart' as jni$_; +import 'package:jni/jni.dart' as jni$_; + +import 'Context.dart' as context$_; + +/// from: `org.graalvm.polyglot.Value$StringEncoding` +class Value$StringEncoding extends jni$_.JObject { + @jni$_.internal + @core$_.override + final jni$_.JObjType $type; + + @jni$_.internal + Value$StringEncoding.fromReference(jni$_.JReference reference) + : $type = type, + super.fromReference(reference); + + static final _class = jni$_.JClass.forName( + r'org/graalvm/polyglot/Value$StringEncoding', + ); + + /// The type which includes information such as the signature of this class. + static const nullableType = $Value$StringEncoding$NullableType(); + static const type = $Value$StringEncoding$Type(); + static final _id_UTF_8 = _class.staticFieldId( + r'UTF_8', + r'Lorg/graalvm/polyglot/Value$StringEncoding;', + ); + + /// from: `static public final org.graalvm.polyglot.Value$StringEncoding UTF_8` + /// The returned object must be released after use, by calling the [release] method. + static Value$StringEncoding? get UTF_8 => + _id_UTF_8.get(_class, const $Value$StringEncoding$NullableType()); + + static final _id_UTF_16_LITTLE_ENDIAN = _class.staticFieldId( + r'UTF_16_LITTLE_ENDIAN', + r'Lorg/graalvm/polyglot/Value$StringEncoding;', + ); + + /// from: `static public final org.graalvm.polyglot.Value$StringEncoding UTF_16_LITTLE_ENDIAN` + /// The returned object must be released after use, by calling the [release] method. + static Value$StringEncoding? get UTF_16_LITTLE_ENDIAN => + _id_UTF_16_LITTLE_ENDIAN.get( + _class, + const $Value$StringEncoding$NullableType(), + ); + + static final _id_UTF_16_BIG_ENDIAN = _class.staticFieldId( + r'UTF_16_BIG_ENDIAN', + r'Lorg/graalvm/polyglot/Value$StringEncoding;', + ); + + /// from: `static public final org.graalvm.polyglot.Value$StringEncoding UTF_16_BIG_ENDIAN` + /// The returned object must be released after use, by calling the [release] method. + static Value$StringEncoding? get UTF_16_BIG_ENDIAN => _id_UTF_16_BIG_ENDIAN + .get(_class, const $Value$StringEncoding$NullableType()); + + static final _id_UTF_32_LITTLE_ENDIAN = _class.staticFieldId( + r'UTF_32_LITTLE_ENDIAN', + r'Lorg/graalvm/polyglot/Value$StringEncoding;', + ); + + /// from: `static public final org.graalvm.polyglot.Value$StringEncoding UTF_32_LITTLE_ENDIAN` + /// The returned object must be released after use, by calling the [release] method. + static Value$StringEncoding? get UTF_32_LITTLE_ENDIAN => + _id_UTF_32_LITTLE_ENDIAN.get( + _class, + const $Value$StringEncoding$NullableType(), + ); + + static final _id_UTF_32_BIG_ENDIAN = _class.staticFieldId( + r'UTF_32_BIG_ENDIAN', + r'Lorg/graalvm/polyglot/Value$StringEncoding;', + ); + + /// from: `static public final org.graalvm.polyglot.Value$StringEncoding UTF_32_BIG_ENDIAN` + /// The returned object must be released after use, by calling the [release] method. + static Value$StringEncoding? get UTF_32_BIG_ENDIAN => _id_UTF_32_BIG_ENDIAN + .get(_class, const $Value$StringEncoding$NullableType()); + + static final _id_UTF_16 = _class.staticFieldId( + r'UTF_16', + r'Lorg/graalvm/polyglot/Value$StringEncoding;', + ); + + /// from: `static public final org.graalvm.polyglot.Value$StringEncoding UTF_16` + /// The returned object must be released after use, by calling the [release] method. + static Value$StringEncoding? get UTF_16 => + _id_UTF_16.get(_class, const $Value$StringEncoding$NullableType()); + + static final _id_UTF_32 = _class.staticFieldId( + r'UTF_32', + r'Lorg/graalvm/polyglot/Value$StringEncoding;', + ); + + /// from: `static public final org.graalvm.polyglot.Value$StringEncoding UTF_32` + /// The returned object must be released after use, by calling the [release] method. + static Value$StringEncoding? get UTF_32 => + _id_UTF_32.get(_class, const $Value$StringEncoding$NullableType()); +} + +final class $Value$StringEncoding$NullableType + extends jni$_.JObjType { + @jni$_.internal + const $Value$StringEncoding$NullableType(); + + @jni$_.internal + @core$_.override + String get signature => r'Lorg/graalvm/polyglot/Value$StringEncoding;'; + + @jni$_.internal + @core$_.override + Value$StringEncoding? fromReference(jni$_.JReference reference) => + reference.isNull ? null : Value$StringEncoding.fromReference(reference); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectNullableType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => this; + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($Value$StringEncoding$NullableType).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($Value$StringEncoding$NullableType) && + other is $Value$StringEncoding$NullableType; + } +} + +final class $Value$StringEncoding$Type + extends jni$_.JObjType { + @jni$_.internal + const $Value$StringEncoding$Type(); + + @jni$_.internal + @core$_.override + String get signature => r'Lorg/graalvm/polyglot/Value$StringEncoding;'; + + @jni$_.internal + @core$_.override + Value$StringEncoding fromReference(jni$_.JReference reference) => + Value$StringEncoding.fromReference(reference); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectNullableType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => + const $Value$StringEncoding$NullableType(); + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($Value$StringEncoding$Type).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($Value$StringEncoding$Type) && + other is $Value$StringEncoding$Type; + } +} + +/// from: `org.graalvm.polyglot.Value` +class Value extends jni$_.JObject { + @jni$_.internal + @core$_.override + final jni$_.JObjType $type; + + @jni$_.internal + Value.fromReference(jni$_.JReference reference) + : $type = type, + super.fromReference(reference); + + static final _class = jni$_.JClass.forName(r'org/graalvm/polyglot/Value'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $Value$NullableType(); + static const type = $Value$Type(); + static final _id_getMetaObject = _class.instanceMethodId( + r'getMetaObject', + r'()Lorg/graalvm/polyglot/Value;', + ); + + static final _getMetaObject = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public org.graalvm.polyglot.Value getMetaObject()` + /// The returned object must be released after use, by calling the [release] method. + Value? getMetaObject() { + return _getMetaObject( + reference.pointer, + _id_getMetaObject as jni$_.JMethodIDPtr, + ).object(const $Value$NullableType()); + } + + static final _id_isMetaObject = _class.instanceMethodId( + r'isMetaObject', + r'()Z', + ); + + static final _isMetaObject = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public boolean isMetaObject()` + bool isMetaObject() { + return _isMetaObject( + reference.pointer, + _id_isMetaObject as jni$_.JMethodIDPtr, + ).boolean; + } + + static final _id_getMetaQualifiedName = _class.instanceMethodId( + r'getMetaQualifiedName', + r'()Ljava/lang/String;', + ); + + static final _getMetaQualifiedName = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public java.lang.String getMetaQualifiedName()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? getMetaQualifiedName() { + return _getMetaQualifiedName( + reference.pointer, + _id_getMetaQualifiedName as jni$_.JMethodIDPtr, + ).object(const jni$_.JStringNullableType()); + } + + static final _id_getMetaSimpleName = _class.instanceMethodId( + r'getMetaSimpleName', + r'()Ljava/lang/String;', + ); + + static final _getMetaSimpleName = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public java.lang.String getMetaSimpleName()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? getMetaSimpleName() { + return _getMetaSimpleName( + reference.pointer, + _id_getMetaSimpleName as jni$_.JMethodIDPtr, + ).object(const jni$_.JStringNullableType()); + } + + static final _id_isMetaInstance = _class.instanceMethodId( + r'isMetaInstance', + r'(Ljava/lang/Object;)Z', + ); + + static final _isMetaInstance = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public boolean isMetaInstance(java.lang.Object instance)` + bool isMetaInstance(jni$_.JObject? instance) { + final _$instance = instance?.reference ?? jni$_.jNullReference; + return _isMetaInstance( + reference.pointer, + _id_isMetaInstance as jni$_.JMethodIDPtr, + _$instance.pointer, + ).boolean; + } + + static final _id_hasMetaParents = _class.instanceMethodId( + r'hasMetaParents', + r'()Z', + ); + + static final _hasMetaParents = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public boolean hasMetaParents()` + bool hasMetaParents() { + return _hasMetaParents( + reference.pointer, + _id_hasMetaParents as jni$_.JMethodIDPtr, + ).boolean; + } + + static final _id_getMetaParents = _class.instanceMethodId( + r'getMetaParents', + r'()Lorg/graalvm/polyglot/Value;', + ); + + static final _getMetaParents = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public org.graalvm.polyglot.Value getMetaParents()` + /// The returned object must be released after use, by calling the [release] method. + Value? getMetaParents() { + return _getMetaParents( + reference.pointer, + _id_getMetaParents as jni$_.JMethodIDPtr, + ).object(const $Value$NullableType()); + } + + static final _id_hasArrayElements = _class.instanceMethodId( + r'hasArrayElements', + r'()Z', + ); + + static final _hasArrayElements = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public boolean hasArrayElements()` + bool hasArrayElements() { + return _hasArrayElements( + reference.pointer, + _id_hasArrayElements as jni$_.JMethodIDPtr, + ).boolean; + } + + static final _id_getArrayElement = _class.instanceMethodId( + r'getArrayElement', + r'(J)Lorg/graalvm/polyglot/Value;', + ); + + static final _getArrayElement = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int64,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + int, + ) + >(); + + /// from: `public org.graalvm.polyglot.Value getArrayElement(long index)` + /// The returned object must be released after use, by calling the [release] method. + Value? getArrayElement(int index) { + return _getArrayElement( + reference.pointer, + _id_getArrayElement as jni$_.JMethodIDPtr, + index, + ).object(const $Value$NullableType()); + } + + static final _id_setArrayElement = _class.instanceMethodId( + r'setArrayElement', + r'(JLjava/lang/Object;)V', + ); + + static final _setArrayElement = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int64, jni$_.Pointer)>, + ) + > + >('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + int, + jni$_.Pointer, + ) + >(); + + /// from: `public void setArrayElement(long index, java.lang.Object value)` + void setArrayElement(int index, jni$_.JObject? value) { + final _$value = value?.reference ?? jni$_.jNullReference; + _setArrayElement( + reference.pointer, + _id_setArrayElement as jni$_.JMethodIDPtr, + index, + _$value.pointer, + ).check(); + } + + static final _id_removeArrayElement = _class.instanceMethodId( + r'removeArrayElement', + r'(J)Z', + ); + + static final _removeArrayElement = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int64,)>, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + int, + ) + >(); + + /// from: `public boolean removeArrayElement(long index)` + bool removeArrayElement(int index) { + return _removeArrayElement( + reference.pointer, + _id_removeArrayElement as jni$_.JMethodIDPtr, + index, + ).boolean; + } + + static final _id_getArraySize = _class.instanceMethodId( + r'getArraySize', + r'()J', + ); + + static final _getArraySize = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallLongMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public long getArraySize()` + int getArraySize() { + return _getArraySize( + reference.pointer, + _id_getArraySize as jni$_.JMethodIDPtr, + ).long; + } + + static final _id_hasBufferElements = _class.instanceMethodId( + r'hasBufferElements', + r'()Z', + ); + + static final _hasBufferElements = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public boolean hasBufferElements()` + bool hasBufferElements() { + return _hasBufferElements( + reference.pointer, + _id_hasBufferElements as jni$_.JMethodIDPtr, + ).boolean; + } + + static final _id_isBufferWritable = _class.instanceMethodId( + r'isBufferWritable', + r'()Z', + ); + + static final _isBufferWritable = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public boolean isBufferWritable()` + bool isBufferWritable() { + return _isBufferWritable( + reference.pointer, + _id_isBufferWritable as jni$_.JMethodIDPtr, + ).boolean; + } + + static final _id_getBufferSize = _class.instanceMethodId( + r'getBufferSize', + r'()J', + ); + + static final _getBufferSize = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallLongMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public long getBufferSize()` + int getBufferSize() { + return _getBufferSize( + reference.pointer, + _id_getBufferSize as jni$_.JMethodIDPtr, + ).long; + } + + static final _id_readBufferByte = _class.instanceMethodId( + r'readBufferByte', + r'(J)B', + ); + + static final _readBufferByte = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int64,)>, + ) + > + >('globalEnv_CallByteMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + int, + ) + >(); + + /// from: `public byte readBufferByte(long byteOffset)` + int readBufferByte(int byteOffset) { + return _readBufferByte( + reference.pointer, + _id_readBufferByte as jni$_.JMethodIDPtr, + byteOffset, + ).byte; + } + + static final _id_readBuffer = _class.instanceMethodId( + r'readBuffer', + r'(J[BII)V', + ); + + static final _readBuffer = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Int64, + jni$_.Pointer, + jni$_.Int32, + jni$_.Int32, + ) + >, + ) + > + >('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + int, + jni$_.Pointer, + int, + int, + ) + >(); + + /// from: `public void readBuffer(long byteOffset, byte[] destination, int destinationOffset, int length)` + void readBuffer( + int byteOffset, + jni$_.JByteArray? destination, + int destinationOffset, + int length, + ) { + final _$destination = destination?.reference ?? jni$_.jNullReference; + _readBuffer( + reference.pointer, + _id_readBuffer as jni$_.JMethodIDPtr, + byteOffset, + _$destination.pointer, + destinationOffset, + length, + ).check(); + } + + static final _id_writeBufferByte = _class.instanceMethodId( + r'writeBufferByte', + r'(JB)V', + ); + + static final _writeBufferByte = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int64, jni$_.Int32)>, + ) + > + >('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + int, + int, + ) + >(); + + /// from: `public void writeBufferByte(long byteOffset, byte value)` + void writeBufferByte(int byteOffset, int value) { + _writeBufferByte( + reference.pointer, + _id_writeBufferByte as jni$_.JMethodIDPtr, + byteOffset, + value, + ).check(); + } + + static final _id_readBufferShort = _class.instanceMethodId( + r'readBufferShort', + r'(Ljava/nio/ByteOrder;J)S', + ); + + static final _readBufferShort = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer, jni$_.Int64)>, + ) + > + >('globalEnv_CallShortMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + int, + ) + >(); + + /// from: `public short readBufferShort(java.nio.ByteOrder order, long byteOffset)` + int readBufferShort(jni$_.JObject? order, int byteOffset) { + final _$order = order?.reference ?? jni$_.jNullReference; + return _readBufferShort( + reference.pointer, + _id_readBufferShort as jni$_.JMethodIDPtr, + _$order.pointer, + byteOffset, + ).short; + } + + static final _id_writeBufferShort = _class.instanceMethodId( + r'writeBufferShort', + r'(Ljava/nio/ByteOrder;JS)V', + ); + + static final _writeBufferShort = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Int64, jni$_.Int32) + >, + ) + > + >('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + int, + int, + ) + >(); + + /// from: `public void writeBufferShort(java.nio.ByteOrder order, long byteOffset, short value)` + void writeBufferShort(jni$_.JObject? order, int byteOffset, int value) { + final _$order = order?.reference ?? jni$_.jNullReference; + _writeBufferShort( + reference.pointer, + _id_writeBufferShort as jni$_.JMethodIDPtr, + _$order.pointer, + byteOffset, + value, + ).check(); + } + + static final _id_readBufferInt = _class.instanceMethodId( + r'readBufferInt', + r'(Ljava/nio/ByteOrder;J)I', + ); + + static final _readBufferInt = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer, jni$_.Int64)>, + ) + > + >('globalEnv_CallIntMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + int, + ) + >(); + + /// from: `public int readBufferInt(java.nio.ByteOrder order, long byteOffset)` + int readBufferInt(jni$_.JObject? order, int byteOffset) { + final _$order = order?.reference ?? jni$_.jNullReference; + return _readBufferInt( + reference.pointer, + _id_readBufferInt as jni$_.JMethodIDPtr, + _$order.pointer, + byteOffset, + ).integer; + } + + static final _id_writeBufferInt = _class.instanceMethodId( + r'writeBufferInt', + r'(Ljava/nio/ByteOrder;JI)V', + ); + + static final _writeBufferInt = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Int64, jni$_.Int32) + >, + ) + > + >('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + int, + int, + ) + >(); + + /// from: `public void writeBufferInt(java.nio.ByteOrder order, long byteOffset, int value)` + void writeBufferInt(jni$_.JObject? order, int byteOffset, int value) { + final _$order = order?.reference ?? jni$_.jNullReference; + _writeBufferInt( + reference.pointer, + _id_writeBufferInt as jni$_.JMethodIDPtr, + _$order.pointer, + byteOffset, + value, + ).check(); + } + + static final _id_readBufferLong = _class.instanceMethodId( + r'readBufferLong', + r'(Ljava/nio/ByteOrder;J)J', + ); + + static final _readBufferLong = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer, jni$_.Int64)>, + ) + > + >('globalEnv_CallLongMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + int, + ) + >(); + + /// from: `public long readBufferLong(java.nio.ByteOrder order, long byteOffset)` + int readBufferLong(jni$_.JObject? order, int byteOffset) { + final _$order = order?.reference ?? jni$_.jNullReference; + return _readBufferLong( + reference.pointer, + _id_readBufferLong as jni$_.JMethodIDPtr, + _$order.pointer, + byteOffset, + ).long; + } + + static final _id_writeBufferLong = _class.instanceMethodId( + r'writeBufferLong', + r'(Ljava/nio/ByteOrder;JJ)V', + ); + + static final _writeBufferLong = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Int64, jni$_.Int64) + >, + ) + > + >('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + int, + int, + ) + >(); + + /// from: `public void writeBufferLong(java.nio.ByteOrder order, long byteOffset, long value)` + void writeBufferLong(jni$_.JObject? order, int byteOffset, int value) { + final _$order = order?.reference ?? jni$_.jNullReference; + _writeBufferLong( + reference.pointer, + _id_writeBufferLong as jni$_.JMethodIDPtr, + _$order.pointer, + byteOffset, + value, + ).check(); + } + + static final _id_readBufferFloat = _class.instanceMethodId( + r'readBufferFloat', + r'(Ljava/nio/ByteOrder;J)F', + ); + + static final _readBufferFloat = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer, jni$_.Int64)>, + ) + > + >('globalEnv_CallFloatMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + int, + ) + >(); + + /// from: `public float readBufferFloat(java.nio.ByteOrder order, long byteOffset)` + double readBufferFloat(jni$_.JObject? order, int byteOffset) { + final _$order = order?.reference ?? jni$_.jNullReference; + return _readBufferFloat( + reference.pointer, + _id_readBufferFloat as jni$_.JMethodIDPtr, + _$order.pointer, + byteOffset, + ).float; + } + + static final _id_writeBufferFloat = _class.instanceMethodId( + r'writeBufferFloat', + r'(Ljava/nio/ByteOrder;JF)V', + ); + + static final _writeBufferFloat = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Int64, jni$_.Double) + >, + ) + > + >('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + int, + double, + ) + >(); + + /// from: `public void writeBufferFloat(java.nio.ByteOrder order, long byteOffset, float value)` + void writeBufferFloat(jni$_.JObject? order, int byteOffset, double value) { + final _$order = order?.reference ?? jni$_.jNullReference; + _writeBufferFloat( + reference.pointer, + _id_writeBufferFloat as jni$_.JMethodIDPtr, + _$order.pointer, + byteOffset, + value, + ).check(); + } + + static final _id_readBufferDouble = _class.instanceMethodId( + r'readBufferDouble', + r'(Ljava/nio/ByteOrder;J)D', + ); + + static final _readBufferDouble = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer, jni$_.Int64)>, + ) + > + >('globalEnv_CallDoubleMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + int, + ) + >(); + + /// from: `public double readBufferDouble(java.nio.ByteOrder order, long byteOffset)` + double readBufferDouble(jni$_.JObject? order, int byteOffset) { + final _$order = order?.reference ?? jni$_.jNullReference; + return _readBufferDouble( + reference.pointer, + _id_readBufferDouble as jni$_.JMethodIDPtr, + _$order.pointer, + byteOffset, + ).doubleFloat; + } + + static final _id_writeBufferDouble = _class.instanceMethodId( + r'writeBufferDouble', + r'(Ljava/nio/ByteOrder;JD)V', + ); + + static final _writeBufferDouble = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Int64, jni$_.Double) + >, + ) + > + >('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + int, + double, + ) + >(); + + /// from: `public void writeBufferDouble(java.nio.ByteOrder order, long byteOffset, double value)` + void writeBufferDouble(jni$_.JObject? order, int byteOffset, double value) { + final _$order = order?.reference ?? jni$_.jNullReference; + _writeBufferDouble( + reference.pointer, + _id_writeBufferDouble as jni$_.JMethodIDPtr, + _$order.pointer, + byteOffset, + value, + ).check(); + } + + static final _id_hasMembers = _class.instanceMethodId(r'hasMembers', r'()Z'); + + static final _hasMembers = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public boolean hasMembers()` + bool hasMembers() { + return _hasMembers( + reference.pointer, + _id_hasMembers as jni$_.JMethodIDPtr, + ).boolean; + } + + static final _id_hasMember = _class.instanceMethodId( + r'hasMember', + r'(Ljava/lang/String;)Z', + ); + + static final _hasMember = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public boolean hasMember(java.lang.String identifier)` + bool hasMember(jni$_.JString? identifier) { + final _$identifier = identifier?.reference ?? jni$_.jNullReference; + return _hasMember( + reference.pointer, + _id_hasMember as jni$_.JMethodIDPtr, + _$identifier.pointer, + ).boolean; + } + + static final _id_getMember = _class.instanceMethodId( + r'getMember', + r'(Ljava/lang/String;)Lorg/graalvm/polyglot/Value;', + ); + + static final _getMember = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Value getMember(java.lang.String identifier)` + /// The returned object must be released after use, by calling the [release] method. + Value? getMember(jni$_.JString? identifier) { + final _$identifier = identifier?.reference ?? jni$_.jNullReference; + return _getMember( + reference.pointer, + _id_getMember as jni$_.JMethodIDPtr, + _$identifier.pointer, + ).object(const $Value$NullableType()); + } + + static final _id_getMemberKeys = _class.instanceMethodId( + r'getMemberKeys', + r'()Ljava/util/Set;', + ); + + static final _getMemberKeys = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public java.util.Set getMemberKeys()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JSet? getMemberKeys() { + return _getMemberKeys( + reference.pointer, + _id_getMemberKeys as jni$_.JMethodIDPtr, + ).object?>( + const jni$_.JSetNullableType(jni$_.JStringNullableType()), + ); + } + + static final _id_putMember = _class.instanceMethodId( + r'putMember', + r'(Ljava/lang/String;Ljava/lang/Object;)V', + ); + + static final _putMember = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public void putMember(java.lang.String identifier, java.lang.Object value)` + void putMember(jni$_.JString? identifier, jni$_.JObject? value) { + final _$identifier = identifier?.reference ?? jni$_.jNullReference; + final _$value = value?.reference ?? jni$_.jNullReference; + _putMember( + reference.pointer, + _id_putMember as jni$_.JMethodIDPtr, + _$identifier.pointer, + _$value.pointer, + ).check(); + } + + static final _id_removeMember = _class.instanceMethodId( + r'removeMember', + r'(Ljava/lang/String;)Z', + ); + + static final _removeMember = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public boolean removeMember(java.lang.String identifier)` + bool removeMember(jni$_.JString? identifier) { + final _$identifier = identifier?.reference ?? jni$_.jNullReference; + return _removeMember( + reference.pointer, + _id_removeMember as jni$_.JMethodIDPtr, + _$identifier.pointer, + ).boolean; + } + + static final _id_canExecute = _class.instanceMethodId(r'canExecute', r'()Z'); + + static final _canExecute = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public boolean canExecute()` + bool canExecute() { + return _canExecute( + reference.pointer, + _id_canExecute as jni$_.JMethodIDPtr, + ).boolean; + } + + static final _id_execute = _class.instanceMethodId( + r'execute', + r'([Ljava/lang/Object;)Lorg/graalvm/polyglot/Value;', + ); + + static final _execute = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Value execute(java.lang.Object[] arguments)` + /// The returned object must be released after use, by calling the [release] method. + Value? execute(jni$_.JArray? arguments) { + final _$arguments = arguments?.reference ?? jni$_.jNullReference; + return _execute( + reference.pointer, + _id_execute as jni$_.JMethodIDPtr, + _$arguments.pointer, + ).object(const $Value$NullableType()); + } + + static final _id_executeVoid = _class.instanceMethodId( + r'executeVoid', + r'([Ljava/lang/Object;)V', + ); + + static final _executeVoid = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public void executeVoid(java.lang.Object[] arguments)` + void executeVoid(jni$_.JArray? arguments) { + final _$arguments = arguments?.reference ?? jni$_.jNullReference; + _executeVoid( + reference.pointer, + _id_executeVoid as jni$_.JMethodIDPtr, + _$arguments.pointer, + ).check(); + } + + static final _id_canInstantiate = _class.instanceMethodId( + r'canInstantiate', + r'()Z', + ); + + static final _canInstantiate = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public boolean canInstantiate()` + bool canInstantiate() { + return _canInstantiate( + reference.pointer, + _id_canInstantiate as jni$_.JMethodIDPtr, + ).boolean; + } + + static final _id_newInstance = _class.instanceMethodId( + r'newInstance', + r'([Ljava/lang/Object;)Lorg/graalvm/polyglot/Value;', + ); + + static final _newInstance = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Value newInstance(java.lang.Object[] arguments)` + /// The returned object must be released after use, by calling the [release] method. + Value? newInstance(jni$_.JArray? arguments) { + final _$arguments = arguments?.reference ?? jni$_.jNullReference; + return _newInstance( + reference.pointer, + _id_newInstance as jni$_.JMethodIDPtr, + _$arguments.pointer, + ).object(const $Value$NullableType()); + } + + static final _id_canInvokeMember = _class.instanceMethodId( + r'canInvokeMember', + r'(Ljava/lang/String;)Z', + ); + + static final _canInvokeMember = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public boolean canInvokeMember(java.lang.String identifier)` + bool canInvokeMember(jni$_.JString? identifier) { + final _$identifier = identifier?.reference ?? jni$_.jNullReference; + return _canInvokeMember( + reference.pointer, + _id_canInvokeMember as jni$_.JMethodIDPtr, + _$identifier.pointer, + ).boolean; + } + + static final _id_invokeMember = _class.instanceMethodId( + r'invokeMember', + r'(Ljava/lang/String;[Ljava/lang/Object;)Lorg/graalvm/polyglot/Value;', + ); + + static final _invokeMember = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Value invokeMember(java.lang.String identifier, java.lang.Object[] arguments)` + /// The returned object must be released after use, by calling the [release] method. + Value? invokeMember( + jni$_.JString? identifier, + jni$_.JArray? arguments, + ) { + final _$identifier = identifier?.reference ?? jni$_.jNullReference; + final _$arguments = arguments?.reference ?? jni$_.jNullReference; + return _invokeMember( + reference.pointer, + _id_invokeMember as jni$_.JMethodIDPtr, + _$identifier.pointer, + _$arguments.pointer, + ).object(const $Value$NullableType()); + } + + static final _id_isString = _class.instanceMethodId(r'isString', r'()Z'); + + static final _isString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public boolean isString()` + bool isString() { + return _isString( + reference.pointer, + _id_isString as jni$_.JMethodIDPtr, + ).boolean; + } + + static final _id_asString = _class.instanceMethodId( + r'asString', + r'()Ljava/lang/String;', + ); + + static final _asString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public java.lang.String asString()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? asString() { + return _asString( + reference.pointer, + _id_asString as jni$_.JMethodIDPtr, + ).object(const jni$_.JStringNullableType()); + } + + static final _id_asStringBytes = _class.instanceMethodId( + r'asStringBytes', + r'(Lorg/graalvm/polyglot/Value$StringEncoding;)[B', + ); + + static final _asStringBytes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public byte[] asStringBytes(org.graalvm.polyglot.Value$StringEncoding encoding)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JByteArray? asStringBytes(Value$StringEncoding? encoding) { + final _$encoding = encoding?.reference ?? jni$_.jNullReference; + return _asStringBytes( + reference.pointer, + _id_asStringBytes as jni$_.JMethodIDPtr, + _$encoding.pointer, + ).object(const jni$_.JByteArrayNullableType()); + } + + static final _id_fitsInInt = _class.instanceMethodId(r'fitsInInt', r'()Z'); + + static final _fitsInInt = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public boolean fitsInInt()` + bool fitsInInt() { + return _fitsInInt( + reference.pointer, + _id_fitsInInt as jni$_.JMethodIDPtr, + ).boolean; + } + + static final _id_asInt = _class.instanceMethodId(r'asInt', r'()I'); + + static final _asInt = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallIntMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public int asInt()` + int asInt() { + return _asInt(reference.pointer, _id_asInt as jni$_.JMethodIDPtr).integer; + } + + static final _id_isBoolean = _class.instanceMethodId(r'isBoolean', r'()Z'); + + static final _isBoolean = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public boolean isBoolean()` + bool isBoolean() { + return _isBoolean( + reference.pointer, + _id_isBoolean as jni$_.JMethodIDPtr, + ).boolean; + } + + static final _id_asBoolean = _class.instanceMethodId(r'asBoolean', r'()Z'); + + static final _asBoolean = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public boolean asBoolean()` + bool asBoolean() { + return _asBoolean( + reference.pointer, + _id_asBoolean as jni$_.JMethodIDPtr, + ).boolean; + } + + static final _id_isNumber = _class.instanceMethodId(r'isNumber', r'()Z'); + + static final _isNumber = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public boolean isNumber()` + bool isNumber() { + return _isNumber( + reference.pointer, + _id_isNumber as jni$_.JMethodIDPtr, + ).boolean; + } + + static final _id_fitsInLong = _class.instanceMethodId(r'fitsInLong', r'()Z'); + + static final _fitsInLong = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public boolean fitsInLong()` + bool fitsInLong() { + return _fitsInLong( + reference.pointer, + _id_fitsInLong as jni$_.JMethodIDPtr, + ).boolean; + } + + static final _id_asLong = _class.instanceMethodId(r'asLong', r'()J'); + + static final _asLong = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallLongMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public long asLong()` + int asLong() { + return _asLong(reference.pointer, _id_asLong as jni$_.JMethodIDPtr).long; + } + + static final _id_fitsInBigInteger = _class.instanceMethodId( + r'fitsInBigInteger', + r'()Z', + ); + + static final _fitsInBigInteger = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public boolean fitsInBigInteger()` + bool fitsInBigInteger() { + return _fitsInBigInteger( + reference.pointer, + _id_fitsInBigInteger as jni$_.JMethodIDPtr, + ).boolean; + } + + static final _id_asBigInteger = _class.instanceMethodId( + r'asBigInteger', + r'()Ljava/math/BigInteger;', + ); + + static final _asBigInteger = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public java.math.BigInteger asBigInteger()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? asBigInteger() { + return _asBigInteger( + reference.pointer, + _id_asBigInteger as jni$_.JMethodIDPtr, + ).object(const jni$_.JObjectNullableType()); + } + + static final _id_fitsInDouble = _class.instanceMethodId( + r'fitsInDouble', + r'()Z', + ); + + static final _fitsInDouble = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public boolean fitsInDouble()` + bool fitsInDouble() { + return _fitsInDouble( + reference.pointer, + _id_fitsInDouble as jni$_.JMethodIDPtr, + ).boolean; + } + + static final _id_asDouble = _class.instanceMethodId(r'asDouble', r'()D'); + + static final _asDouble = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallDoubleMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public double asDouble()` + double asDouble() { + return _asDouble( + reference.pointer, + _id_asDouble as jni$_.JMethodIDPtr, + ).doubleFloat; + } + + static final _id_fitsInFloat = _class.instanceMethodId( + r'fitsInFloat', + r'()Z', + ); + + static final _fitsInFloat = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public boolean fitsInFloat()` + bool fitsInFloat() { + return _fitsInFloat( + reference.pointer, + _id_fitsInFloat as jni$_.JMethodIDPtr, + ).boolean; + } + + static final _id_asFloat = _class.instanceMethodId(r'asFloat', r'()F'); + + static final _asFloat = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallFloatMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public float asFloat()` + double asFloat() { + return _asFloat(reference.pointer, _id_asFloat as jni$_.JMethodIDPtr).float; + } + + static final _id_fitsInByte = _class.instanceMethodId(r'fitsInByte', r'()Z'); + + static final _fitsInByte = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public boolean fitsInByte()` + bool fitsInByte() { + return _fitsInByte( + reference.pointer, + _id_fitsInByte as jni$_.JMethodIDPtr, + ).boolean; + } + + static final _id_asByte = _class.instanceMethodId(r'asByte', r'()B'); + + static final _asByte = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallByteMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public byte asByte()` + int asByte() { + return _asByte(reference.pointer, _id_asByte as jni$_.JMethodIDPtr).byte; + } + + static final _id_fitsInShort = _class.instanceMethodId( + r'fitsInShort', + r'()Z', + ); + + static final _fitsInShort = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public boolean fitsInShort()` + bool fitsInShort() { + return _fitsInShort( + reference.pointer, + _id_fitsInShort as jni$_.JMethodIDPtr, + ).boolean; + } + + static final _id_asShort = _class.instanceMethodId(r'asShort', r'()S'); + + static final _asShort = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallShortMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public short asShort()` + int asShort() { + return _asShort(reference.pointer, _id_asShort as jni$_.JMethodIDPtr).short; + } + + static final _id_isNull$1 = _class.instanceMethodId(r'isNull', r'()Z'); + + static final _isNull$1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public boolean isNull()` + bool isNull$1() { + return _isNull$1( + reference.pointer, + _id_isNull$1 as jni$_.JMethodIDPtr, + ).boolean; + } + + static final _id_isNativePointer = _class.instanceMethodId( + r'isNativePointer', + r'()Z', + ); + + static final _isNativePointer = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public boolean isNativePointer()` + bool isNativePointer() { + return _isNativePointer( + reference.pointer, + _id_isNativePointer as jni$_.JMethodIDPtr, + ).boolean; + } + + static final _id_asNativePointer = _class.instanceMethodId( + r'asNativePointer', + r'()J', + ); + + static final _asNativePointer = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallLongMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public long asNativePointer()` + int asNativePointer() { + return _asNativePointer( + reference.pointer, + _id_asNativePointer as jni$_.JMethodIDPtr, + ).long; + } + + static final _id_isHostObject = _class.instanceMethodId( + r'isHostObject', + r'()Z', + ); + + static final _isHostObject = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public boolean isHostObject()` + bool isHostObject() { + return _isHostObject( + reference.pointer, + _id_isHostObject as jni$_.JMethodIDPtr, + ).boolean; + } + + static final _id_asHostObject = _class.instanceMethodId( + r'asHostObject', + r'()Ljava/lang/Object;', + ); + + static final _asHostObject = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public T asHostObject()` + /// The returned object must be released after use, by calling the [release] method. + $T? asHostObject<$T extends jni$_.JObject?>({required jni$_.JObjType<$T> T}) { + return _asHostObject( + reference.pointer, + _id_asHostObject as jni$_.JMethodIDPtr, + ).object<$T?>(T.nullableType); + } + + static final _id_isProxyObject = _class.instanceMethodId( + r'isProxyObject', + r'()Z', + ); + + static final _isProxyObject = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public boolean isProxyObject()` + bool isProxyObject() { + return _isProxyObject( + reference.pointer, + _id_isProxyObject as jni$_.JMethodIDPtr, + ).boolean; + } + + static final _id_asProxyObject = _class.instanceMethodId( + r'asProxyObject', + r'()Lorg/graalvm/polyglot/proxy/Proxy;', + ); + + static final _asProxyObject = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public T asProxyObject()` + /// The returned object must be released after use, by calling the [release] method. + $T? asProxyObject<$T extends jni$_.JObject?>({ + required jni$_.JObjType<$T> T, + }) { + return _asProxyObject( + reference.pointer, + _id_asProxyObject as jni$_.JMethodIDPtr, + ).object<$T?>(T.nullableType); + } + + static final _id_as$1 = _class.instanceMethodId( + r'as', + r'(Ljava/lang/Class;)Ljava/lang/Object;', + ); + + static final _as$1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public T as(java.lang.Class targetType)` + /// The returned object must be released after use, by calling the [release] method. + $T? as$1<$T extends jni$_.JObject?>( + jni$_.JObject? targetType, { + required jni$_.JObjType<$T> T, + }) { + final _$targetType = targetType?.reference ?? jni$_.jNullReference; + return _as$1( + reference.pointer, + _id_as$1 as jni$_.JMethodIDPtr, + _$targetType.pointer, + ).object<$T?>(T.nullableType); + } + + static final _id_as$2 = _class.instanceMethodId( + r'as', + r'(Lorg/graalvm/polyglot/TypeLiteral;)Ljava/lang/Object;', + ); + + static final _as$2 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public T as(org.graalvm.polyglot.TypeLiteral targetType)` + /// The returned object must be released after use, by calling the [release] method. + $T? as$2<$T extends jni$_.JObject?>( + jni$_.JObject? targetType, { + required jni$_.JObjType<$T> T, + }) { + final _$targetType = targetType?.reference ?? jni$_.jNullReference; + return _as$2( + reference.pointer, + _id_as$2 as jni$_.JMethodIDPtr, + _$targetType.pointer, + ).object<$T?>(T.nullableType); + } + + static final _id_toString$1 = _class.instanceMethodId( + r'toString', + r'()Ljava/lang/String;', + ); + + static final _toString$1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public java.lang.String toString()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? toString$1() { + return _toString$1( + reference.pointer, + _id_toString$1 as jni$_.JMethodIDPtr, + ).object(const jni$_.JStringNullableType()); + } + + static final _id_getSourceLocation = _class.instanceMethodId( + r'getSourceLocation', + r'()Lorg/graalvm/polyglot/SourceSection;', + ); + + static final _getSourceLocation = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public org.graalvm.polyglot.SourceSection getSourceLocation()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? getSourceLocation() { + return _getSourceLocation( + reference.pointer, + _id_getSourceLocation as jni$_.JMethodIDPtr, + ).object(const jni$_.JObjectNullableType()); + } + + static final _id_isDate = _class.instanceMethodId(r'isDate', r'()Z'); + + static final _isDate = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public boolean isDate()` + bool isDate() { + return _isDate(reference.pointer, _id_isDate as jni$_.JMethodIDPtr).boolean; + } + + static final _id_asDate = _class.instanceMethodId( + r'asDate', + r'()Ljava/time/LocalDate;', + ); + + static final _asDate = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public java.time.LocalDate asDate()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? asDate() { + return _asDate( + reference.pointer, + _id_asDate as jni$_.JMethodIDPtr, + ).object(const jni$_.JObjectNullableType()); + } + + static final _id_isTime = _class.instanceMethodId(r'isTime', r'()Z'); + + static final _isTime = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public boolean isTime()` + bool isTime() { + return _isTime(reference.pointer, _id_isTime as jni$_.JMethodIDPtr).boolean; + } + + static final _id_asTime = _class.instanceMethodId( + r'asTime', + r'()Ljava/time/LocalTime;', + ); + + static final _asTime = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public java.time.LocalTime asTime()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? asTime() { + return _asTime( + reference.pointer, + _id_asTime as jni$_.JMethodIDPtr, + ).object(const jni$_.JObjectNullableType()); + } + + static final _id_isInstant = _class.instanceMethodId(r'isInstant', r'()Z'); + + static final _isInstant = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public boolean isInstant()` + bool isInstant() { + return _isInstant( + reference.pointer, + _id_isInstant as jni$_.JMethodIDPtr, + ).boolean; + } + + static final _id_asInstant = _class.instanceMethodId( + r'asInstant', + r'()Ljava/time/Instant;', + ); + + static final _asInstant = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public java.time.Instant asInstant()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? asInstant() { + return _asInstant( + reference.pointer, + _id_asInstant as jni$_.JMethodIDPtr, + ).object(const jni$_.JObjectNullableType()); + } + + static final _id_isTimeZone = _class.instanceMethodId(r'isTimeZone', r'()Z'); + + static final _isTimeZone = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public boolean isTimeZone()` + bool isTimeZone() { + return _isTimeZone( + reference.pointer, + _id_isTimeZone as jni$_.JMethodIDPtr, + ).boolean; + } + + static final _id_asTimeZone = _class.instanceMethodId( + r'asTimeZone', + r'()Ljava/time/ZoneId;', + ); + + static final _asTimeZone = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public java.time.ZoneId asTimeZone()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? asTimeZone() { + return _asTimeZone( + reference.pointer, + _id_asTimeZone as jni$_.JMethodIDPtr, + ).object(const jni$_.JObjectNullableType()); + } + + static final _id_isDuration = _class.instanceMethodId(r'isDuration', r'()Z'); + + static final _isDuration = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public boolean isDuration()` + bool isDuration() { + return _isDuration( + reference.pointer, + _id_isDuration as jni$_.JMethodIDPtr, + ).boolean; + } + + static final _id_asDuration = _class.instanceMethodId( + r'asDuration', + r'()Ljava/time/Duration;', + ); + + static final _asDuration = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public java.time.Duration asDuration()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? asDuration() { + return _asDuration( + reference.pointer, + _id_asDuration as jni$_.JMethodIDPtr, + ).object(const jni$_.JObjectNullableType()); + } + + static final _id_isException = _class.instanceMethodId( + r'isException', + r'()Z', + ); + + static final _isException = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public boolean isException()` + bool isException() { + return _isException( + reference.pointer, + _id_isException as jni$_.JMethodIDPtr, + ).boolean; + } + + static final _id_throwException = _class.instanceMethodId( + r'throwException', + r'()Ljava/lang/RuntimeException;', + ); + + static final _throwException = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public java.lang.RuntimeException throwException()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? throwException() { + return _throwException( + reference.pointer, + _id_throwException as jni$_.JMethodIDPtr, + ).object(const jni$_.JObjectNullableType()); + } + + static final _id_getContext = _class.instanceMethodId( + r'getContext', + r'()Lorg/graalvm/polyglot/Context;', + ); + + static final _getContext = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public org.graalvm.polyglot.Context getContext()` + /// The returned object must be released after use, by calling the [release] method. + context$_.Context? getContext() { + return _getContext( + reference.pointer, + _id_getContext as jni$_.JMethodIDPtr, + ).object(const context$_.$Context$NullableType()); + } + + static final _id_equals = _class.instanceMethodId( + r'equals', + r'(Ljava/lang/Object;)Z', + ); + + static final _equals = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public boolean equals(java.lang.Object obj)` + bool equals(jni$_.JObject? obj) { + final _$obj = obj?.reference ?? jni$_.jNullReference; + return _equals( + reference.pointer, + _id_equals as jni$_.JMethodIDPtr, + _$obj.pointer, + ).boolean; + } + + static final _id_hashCode$1 = _class.instanceMethodId(r'hashCode', r'()I'); + + static final _hashCode$1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallIntMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public int hashCode()` + int hashCode$1() { + return _hashCode$1( + reference.pointer, + _id_hashCode$1 as jni$_.JMethodIDPtr, + ).integer; + } + + static final _id_hasIterator = _class.instanceMethodId( + r'hasIterator', + r'()Z', + ); + + static final _hasIterator = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public boolean hasIterator()` + bool hasIterator() { + return _hasIterator( + reference.pointer, + _id_hasIterator as jni$_.JMethodIDPtr, + ).boolean; + } + + static final _id_getIterator = _class.instanceMethodId( + r'getIterator', + r'()Lorg/graalvm/polyglot/Value;', + ); + + static final _getIterator = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public org.graalvm.polyglot.Value getIterator()` + /// The returned object must be released after use, by calling the [release] method. + Value? getIterator() { + return _getIterator( + reference.pointer, + _id_getIterator as jni$_.JMethodIDPtr, + ).object(const $Value$NullableType()); + } + + static final _id_isIterator = _class.instanceMethodId(r'isIterator', r'()Z'); + + static final _isIterator = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public boolean isIterator()` + bool isIterator() { + return _isIterator( + reference.pointer, + _id_isIterator as jni$_.JMethodIDPtr, + ).boolean; + } + + static final _id_hasIteratorNextElement = _class.instanceMethodId( + r'hasIteratorNextElement', + r'()Z', + ); + + static final _hasIteratorNextElement = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public boolean hasIteratorNextElement()` + bool hasIteratorNextElement() { + return _hasIteratorNextElement( + reference.pointer, + _id_hasIteratorNextElement as jni$_.JMethodIDPtr, + ).boolean; + } + + static final _id_getIteratorNextElement = _class.instanceMethodId( + r'getIteratorNextElement', + r'()Lorg/graalvm/polyglot/Value;', + ); + + static final _getIteratorNextElement = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public org.graalvm.polyglot.Value getIteratorNextElement()` + /// The returned object must be released after use, by calling the [release] method. + Value? getIteratorNextElement() { + return _getIteratorNextElement( + reference.pointer, + _id_getIteratorNextElement as jni$_.JMethodIDPtr, + ).object(const $Value$NullableType()); + } + + static final _id_hasHashEntries = _class.instanceMethodId( + r'hasHashEntries', + r'()Z', + ); + + static final _hasHashEntries = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public boolean hasHashEntries()` + bool hasHashEntries() { + return _hasHashEntries( + reference.pointer, + _id_hasHashEntries as jni$_.JMethodIDPtr, + ).boolean; + } + + static final _id_getHashSize = _class.instanceMethodId( + r'getHashSize', + r'()J', + ); + + static final _getHashSize = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallLongMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public long getHashSize()` + int getHashSize() { + return _getHashSize( + reference.pointer, + _id_getHashSize as jni$_.JMethodIDPtr, + ).long; + } + + static final _id_hasHashEntry = _class.instanceMethodId( + r'hasHashEntry', + r'(Ljava/lang/Object;)Z', + ); + + static final _hasHashEntry = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public boolean hasHashEntry(java.lang.Object key)` + bool hasHashEntry(jni$_.JObject? key) { + final _$key = key?.reference ?? jni$_.jNullReference; + return _hasHashEntry( + reference.pointer, + _id_hasHashEntry as jni$_.JMethodIDPtr, + _$key.pointer, + ).boolean; + } + + static final _id_getHashValue = _class.instanceMethodId( + r'getHashValue', + r'(Ljava/lang/Object;)Lorg/graalvm/polyglot/Value;', + ); + + static final _getHashValue = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Value getHashValue(java.lang.Object key)` + /// The returned object must be released after use, by calling the [release] method. + Value? getHashValue(jni$_.JObject? key) { + final _$key = key?.reference ?? jni$_.jNullReference; + return _getHashValue( + reference.pointer, + _id_getHashValue as jni$_.JMethodIDPtr, + _$key.pointer, + ).object(const $Value$NullableType()); + } + + static final _id_getHashValueOrDefault = _class.instanceMethodId( + r'getHashValueOrDefault', + r'(Ljava/lang/Object;Ljava/lang/Object;)Lorg/graalvm/polyglot/Value;', + ); + + static final _getHashValueOrDefault = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public org.graalvm.polyglot.Value getHashValueOrDefault(java.lang.Object key, java.lang.Object defaultValue)` + /// The returned object must be released after use, by calling the [release] method. + Value? getHashValueOrDefault( + jni$_.JObject? key, + jni$_.JObject? defaultValue, + ) { + final _$key = key?.reference ?? jni$_.jNullReference; + final _$defaultValue = defaultValue?.reference ?? jni$_.jNullReference; + return _getHashValueOrDefault( + reference.pointer, + _id_getHashValueOrDefault as jni$_.JMethodIDPtr, + _$key.pointer, + _$defaultValue.pointer, + ).object(const $Value$NullableType()); + } + + static final _id_putHashEntry = _class.instanceMethodId( + r'putHashEntry', + r'(Ljava/lang/Object;Ljava/lang/Object;)V', + ); + + static final _putHashEntry = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public void putHashEntry(java.lang.Object key, java.lang.Object value)` + void putHashEntry(jni$_.JObject? key, jni$_.JObject? value) { + final _$key = key?.reference ?? jni$_.jNullReference; + final _$value = value?.reference ?? jni$_.jNullReference; + _putHashEntry( + reference.pointer, + _id_putHashEntry as jni$_.JMethodIDPtr, + _$key.pointer, + _$value.pointer, + ).check(); + } + + static final _id_removeHashEntry = _class.instanceMethodId( + r'removeHashEntry', + r'(Ljava/lang/Object;)Z', + ); + + static final _removeHashEntry = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public boolean removeHashEntry(java.lang.Object key)` + bool removeHashEntry(jni$_.JObject? key) { + final _$key = key?.reference ?? jni$_.jNullReference; + return _removeHashEntry( + reference.pointer, + _id_removeHashEntry as jni$_.JMethodIDPtr, + _$key.pointer, + ).boolean; + } + + static final _id_getHashEntriesIterator = _class.instanceMethodId( + r'getHashEntriesIterator', + r'()Lorg/graalvm/polyglot/Value;', + ); + + static final _getHashEntriesIterator = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public org.graalvm.polyglot.Value getHashEntriesIterator()` + /// The returned object must be released after use, by calling the [release] method. + Value? getHashEntriesIterator() { + return _getHashEntriesIterator( + reference.pointer, + _id_getHashEntriesIterator as jni$_.JMethodIDPtr, + ).object(const $Value$NullableType()); + } + + static final _id_getHashKeysIterator = _class.instanceMethodId( + r'getHashKeysIterator', + r'()Lorg/graalvm/polyglot/Value;', + ); + + static final _getHashKeysIterator = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public org.graalvm.polyglot.Value getHashKeysIterator()` + /// The returned object must be released after use, by calling the [release] method. + Value? getHashKeysIterator() { + return _getHashKeysIterator( + reference.pointer, + _id_getHashKeysIterator as jni$_.JMethodIDPtr, + ).object(const $Value$NullableType()); + } + + static final _id_getHashValuesIterator = _class.instanceMethodId( + r'getHashValuesIterator', + r'()Lorg/graalvm/polyglot/Value;', + ); + + static final _getHashValuesIterator = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public org.graalvm.polyglot.Value getHashValuesIterator()` + /// The returned object must be released after use, by calling the [release] method. + Value? getHashValuesIterator() { + return _getHashValuesIterator( + reference.pointer, + _id_getHashValuesIterator as jni$_.JMethodIDPtr, + ).object(const $Value$NullableType()); + } + + static final _id_asValue = _class.staticMethodId( + r'asValue', + r'(Ljava/lang/Object;)Lorg/graalvm/polyglot/Value;', + ); + + static final _asValue = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `static public org.graalvm.polyglot.Value asValue(java.lang.Object o)` + /// The returned object must be released after use, by calling the [release] method. + static Value? asValue(jni$_.JObject? o) { + final _$o = o?.reference ?? jni$_.jNullReference; + return _asValue( + _class.reference.pointer, + _id_asValue as jni$_.JMethodIDPtr, + _$o.pointer, + ).object(const $Value$NullableType()); + } + + static final _id_pin = _class.instanceMethodId(r'pin', r'()V'); + + static final _pin = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public void pin()` + void pin() { + _pin(reference.pointer, _id_pin as jni$_.JMethodIDPtr).check(); + } + + static final _id_fromByteBasedString = _class.staticMethodId( + r'fromByteBasedString', + r'([BLorg/graalvm/polyglot/Value$StringEncoding;)Lorg/graalvm/polyglot/Value;', + ); + + static final _fromByteBasedString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `static public org.graalvm.polyglot.Value fromByteBasedString(byte[] bytes, org.graalvm.polyglot.Value$StringEncoding encoding)` + /// The returned object must be released after use, by calling the [release] method. + static Value? fromByteBasedString( + jni$_.JByteArray? bytes, + Value$StringEncoding? encoding, + ) { + final _$bytes = bytes?.reference ?? jni$_.jNullReference; + final _$encoding = encoding?.reference ?? jni$_.jNullReference; + return _fromByteBasedString( + _class.reference.pointer, + _id_fromByteBasedString as jni$_.JMethodIDPtr, + _$bytes.pointer, + _$encoding.pointer, + ).object(const $Value$NullableType()); + } + + static final _id_fromByteBasedString$1 = _class.staticMethodId( + r'fromByteBasedString', + r'([BIILorg/graalvm/polyglot/Value$StringEncoding;Z)Lorg/graalvm/polyglot/Value;', + ); + + static final _fromByteBasedString$1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Int32, + jni$_.Int32, + jni$_.Pointer, + jni$_.Int32, + ) + >, + ) + > + >('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + int, + int, + jni$_.Pointer, + int, + ) + >(); + + /// from: `static public org.graalvm.polyglot.Value fromByteBasedString(byte[] bytes, int offset, int length, org.graalvm.polyglot.Value$StringEncoding encoding, boolean copy)` + /// The returned object must be released after use, by calling the [release] method. + static Value? fromByteBasedString$1( + jni$_.JByteArray? bytes, + int offset, + int length, + Value$StringEncoding? encoding, + bool copy, + ) { + final _$bytes = bytes?.reference ?? jni$_.jNullReference; + final _$encoding = encoding?.reference ?? jni$_.jNullReference; + return _fromByteBasedString$1( + _class.reference.pointer, + _id_fromByteBasedString$1 as jni$_.JMethodIDPtr, + _$bytes.pointer, + offset, + length, + _$encoding.pointer, + copy ? 1 : 0, + ).object(const $Value$NullableType()); + } + + static final _id_fromNativeString = _class.staticMethodId( + r'fromNativeString', + r'(JIILorg/graalvm/polyglot/Value$StringEncoding;Z)Lorg/graalvm/polyglot/Value;', + ); + + static final _fromNativeString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Int64, + jni$_.Int32, + jni$_.Int32, + jni$_.Pointer, + jni$_.Int32, + ) + >, + ) + > + >('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + int, + int, + int, + jni$_.Pointer, + int, + ) + >(); + + /// from: `static public org.graalvm.polyglot.Value fromNativeString(long basePointer, int byteOffset, int byteLength, org.graalvm.polyglot.Value$StringEncoding encoding, boolean copy)` + /// The returned object must be released after use, by calling the [release] method. + static Value? fromNativeString( + int basePointer, + int byteOffset, + int byteLength, + Value$StringEncoding? encoding, + bool copy, + ) { + final _$encoding = encoding?.reference ?? jni$_.jNullReference; + return _fromNativeString( + _class.reference.pointer, + _id_fromNativeString as jni$_.JMethodIDPtr, + basePointer, + byteOffset, + byteLength, + _$encoding.pointer, + copy ? 1 : 0, + ).object(const $Value$NullableType()); + } + + static final _id_fromNativeString$1 = _class.staticMethodId( + r'fromNativeString', + r'(JILorg/graalvm/polyglot/Value$StringEncoding;)Lorg/graalvm/polyglot/Value;', + ); + + static final _fromNativeString$1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Int64, jni$_.Int32, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + int, + int, + jni$_.Pointer, + ) + >(); + + /// from: `static public org.graalvm.polyglot.Value fromNativeString(long basePointer, int byteLength, org.graalvm.polyglot.Value$StringEncoding encoding)` + /// The returned object must be released after use, by calling the [release] method. + static Value? fromNativeString$1( + int basePointer, + int byteLength, + Value$StringEncoding? encoding, + ) { + final _$encoding = encoding?.reference ?? jni$_.jNullReference; + return _fromNativeString$1( + _class.reference.pointer, + _id_fromNativeString$1 as jni$_.JMethodIDPtr, + basePointer, + byteLength, + _$encoding.pointer, + ).object(const $Value$NullableType()); + } +} + +final class $Value$NullableType extends jni$_.JObjType { + @jni$_.internal + const $Value$NullableType(); + + @jni$_.internal + @core$_.override + String get signature => r'Lorg/graalvm/polyglot/Value;'; + + @jni$_.internal + @core$_.override + Value? fromReference(jni$_.JReference reference) => + reference.isNull ? null : Value.fromReference(reference); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectNullableType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => this; + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($Value$NullableType).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($Value$NullableType) && + other is $Value$NullableType; + } +} + +final class $Value$Type extends jni$_.JObjType { + @jni$_.internal + const $Value$Type(); + + @jni$_.internal + @core$_.override + String get signature => r'Lorg/graalvm/polyglot/Value;'; + + @jni$_.internal + @core$_.override + Value fromReference(jni$_.JReference reference) => + Value.fromReference(reference); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectNullableType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => const $Value$NullableType(); + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($Value$Type).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($Value$Type) && other is $Value$Type; + } +} diff --git a/graalvm_test/lib/graal/org/graalvm/polyglot/_package.dart b/graalvm_test/lib/graal/org/graalvm/polyglot/_package.dart new file mode 100644 index 0000000..394c32b --- /dev/null +++ b/graalvm_test/lib/graal/org/graalvm/polyglot/_package.dart @@ -0,0 +1,3 @@ +// AUTO GENERATED BY JNIGEN 0.14.2. DO NOT EDIT! +export 'Context.dart'; +export 'Value.dart'; diff --git a/graalvm_test/lib/graalvm_test.dart b/graalvm_test/lib/graalvm_test.dart new file mode 100644 index 0000000..f64ad72 --- /dev/null +++ b/graalvm_test/lib/graalvm_test.dart @@ -0,0 +1,3 @@ +int calculate() { + return 6 * 7; +} diff --git a/graalvm_test/pubspec.yaml b/graalvm_test/pubspec.yaml new file mode 100644 index 0000000..816bcbe --- /dev/null +++ b/graalvm_test/pubspec.yaml @@ -0,0 +1,17 @@ +name: graalvm_test +description: A sample command-line application. +version: 1.0.0 +# repository: https://github.com/my_org/my_repo + +environment: + sdk: ^3.10.0-36.0.dev + +# Add regular dependencies here. +dependencies: + path: ^1.9.0 + jni: ^0.14.2 + jnigen: ^0.14.2 + +dev_dependencies: + lints: ^6.0.0 + test: ^1.25.6 From 9a8ed792ae532ae1292fd89a054bfb2d194dfdaa Mon Sep 17 00:00:00 2001 From: James Williams <66931+jwill@users.noreply.github.com> Date: Tue, 9 Sep 2025 20:24:19 -0700 Subject: [PATCH 2/3] Removed generated files. --- .../graal/org/graalvm/polyglot/Context.dart | 2130 ---------- .../lib/graal/org/graalvm/polyglot/Value.dart | 3680 ----------------- .../graal/org/graalvm/polyglot/_package.dart | 3 - 3 files changed, 5813 deletions(-) delete mode 100644 graalvm_test/lib/graal/org/graalvm/polyglot/Context.dart delete mode 100644 graalvm_test/lib/graal/org/graalvm/polyglot/Value.dart delete mode 100644 graalvm_test/lib/graal/org/graalvm/polyglot/_package.dart diff --git a/graalvm_test/lib/graal/org/graalvm/polyglot/Context.dart b/graalvm_test/lib/graal/org/graalvm/polyglot/Context.dart deleted file mode 100644 index 0c7f3d0..0000000 --- a/graalvm_test/lib/graal/org/graalvm/polyglot/Context.dart +++ /dev/null @@ -1,2130 +0,0 @@ -// AUTO GENERATED BY JNIGEN 0.14.2. 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 -// ignore_for_file: comment_references -// ignore_for_file: doc_directive_unknown -// ignore_for_file: file_names -// ignore_for_file: inference_failure_on_untyped_parameter -// ignore_for_file: invalid_internal_annotation -// ignore_for_file: invalid_use_of_internal_member -// ignore_for_file: library_prefixes -// ignore_for_file: lines_longer_than_80_chars -// ignore_for_file: no_leading_underscores_for_library_prefixes -// 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: unintended_html_in_doc_comment -// ignore_for_file: unnecessary_cast -// ignore_for_file: unnecessary_non_null_assertion -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: unused_element -// ignore_for_file: unused_field -// ignore_for_file: unused_import -// ignore_for_file: unused_local_variable -// ignore_for_file: unused_shown_name -// ignore_for_file: use_super_parameters - -import 'dart:core' show Object, String, bool, double, int; -import 'dart:core' as core$_; - -import 'package:jni/_internal.dart' as jni$_; -import 'package:jni/jni.dart' as jni$_; - -import 'Value.dart' as value$_; - -/// from: `org.graalvm.polyglot.Context$Builder` -class Context$Builder extends jni$_.JObject { - @jni$_.internal - @core$_.override - final jni$_.JObjType $type; - - @jni$_.internal - Context$Builder.fromReference(jni$_.JReference reference) - : $type = type, - super.fromReference(reference); - - static final _class = jni$_.JClass.forName( - r'org/graalvm/polyglot/Context$Builder', - ); - - /// The type which includes information such as the signature of this class. - static const nullableType = $Context$Builder$NullableType(); - static const type = $Context$Builder$Type(); - static final _id_engine = _class.instanceMethodId( - r'engine', - r'(Lorg/graalvm/polyglot/Engine;)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _engine = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder engine(org.graalvm.polyglot.Engine engine)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? engine(jni$_.JObject? engine) { - final _$engine = engine?.reference ?? jni$_.jNullReference; - return _engine( - reference.pointer, - _id_engine as jni$_.JMethodIDPtr, - _$engine.pointer, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_out = _class.instanceMethodId( - r'out', - r'(Ljava/io/OutputStream;)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _out = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder out(java.io.OutputStream out)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? out(jni$_.JObject? out) { - final _$out = out?.reference ?? jni$_.jNullReference; - return _out( - reference.pointer, - _id_out as jni$_.JMethodIDPtr, - _$out.pointer, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_err = _class.instanceMethodId( - r'err', - r'(Ljava/io/OutputStream;)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _err = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder err(java.io.OutputStream err)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? err(jni$_.JObject? err) { - final _$err = err?.reference ?? jni$_.jNullReference; - return _err( - reference.pointer, - _id_err as jni$_.JMethodIDPtr, - _$err.pointer, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_in$ = _class.instanceMethodId( - r'in', - r'(Ljava/io/InputStream;)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _in$ = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder in(java.io.InputStream in)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? in$(jni$_.JObject? in$) { - final _$in$ = in$?.reference ?? jni$_.jNullReference; - return _in$( - reference.pointer, - _id_in$ as jni$_.JMethodIDPtr, - _$in$.pointer, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_allowHostAccess = _class.instanceMethodId( - r'allowHostAccess', - r'(Z)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _allowHostAccess = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int32,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - int, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder allowHostAccess(boolean enabled)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? allowHostAccess(bool enabled) { - return _allowHostAccess( - reference.pointer, - _id_allowHostAccess as jni$_.JMethodIDPtr, - enabled ? 1 : 0, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_allowHostAccess$1 = _class.instanceMethodId( - r'allowHostAccess', - r'(Lorg/graalvm/polyglot/HostAccess;)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _allowHostAccess$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder allowHostAccess(org.graalvm.polyglot.HostAccess config)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? allowHostAccess$1(jni$_.JObject? config) { - final _$config = config?.reference ?? jni$_.jNullReference; - return _allowHostAccess$1( - reference.pointer, - _id_allowHostAccess$1 as jni$_.JMethodIDPtr, - _$config.pointer, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_allowNativeAccess = _class.instanceMethodId( - r'allowNativeAccess', - r'(Z)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _allowNativeAccess = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int32,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - int, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder allowNativeAccess(boolean enabled)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? allowNativeAccess(bool enabled) { - return _allowNativeAccess( - reference.pointer, - _id_allowNativeAccess as jni$_.JMethodIDPtr, - enabled ? 1 : 0, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_allowCreateThread = _class.instanceMethodId( - r'allowCreateThread', - r'(Z)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _allowCreateThread = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int32,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - int, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder allowCreateThread(boolean enabled)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? allowCreateThread(bool enabled) { - return _allowCreateThread( - reference.pointer, - _id_allowCreateThread as jni$_.JMethodIDPtr, - enabled ? 1 : 0, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_allowAllAccess = _class.instanceMethodId( - r'allowAllAccess', - r'(Z)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _allowAllAccess = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int32,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - int, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder allowAllAccess(boolean enabled)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? allowAllAccess(bool enabled) { - return _allowAllAccess( - reference.pointer, - _id_allowAllAccess as jni$_.JMethodIDPtr, - enabled ? 1 : 0, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_allowHostClassLoading = _class.instanceMethodId( - r'allowHostClassLoading', - r'(Z)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _allowHostClassLoading = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int32,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - int, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder allowHostClassLoading(boolean enabled)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? allowHostClassLoading(bool enabled) { - return _allowHostClassLoading( - reference.pointer, - _id_allowHostClassLoading as jni$_.JMethodIDPtr, - enabled ? 1 : 0, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_allowHostClassLookup = _class.instanceMethodId( - r'allowHostClassLookup', - r'(Ljava/util/function/Predicate;)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _allowHostClassLookup = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder allowHostClassLookup(java.util.function.Predicate classFilter)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? allowHostClassLookup(jni$_.JObject? classFilter) { - final _$classFilter = classFilter?.reference ?? jni$_.jNullReference; - return _allowHostClassLookup( - reference.pointer, - _id_allowHostClassLookup as jni$_.JMethodIDPtr, - _$classFilter.pointer, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_allowExperimentalOptions = _class.instanceMethodId( - r'allowExperimentalOptions', - r'(Z)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _allowExperimentalOptions = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int32,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - int, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder allowExperimentalOptions(boolean enabled)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? allowExperimentalOptions(bool enabled) { - return _allowExperimentalOptions( - reference.pointer, - _id_allowExperimentalOptions as jni$_.JMethodIDPtr, - enabled ? 1 : 0, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_allowPolyglotAccess = _class.instanceMethodId( - r'allowPolyglotAccess', - r'(Lorg/graalvm/polyglot/PolyglotAccess;)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _allowPolyglotAccess = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder allowPolyglotAccess(org.graalvm.polyglot.PolyglotAccess accessPolicy)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? allowPolyglotAccess(jni$_.JObject? accessPolicy) { - final _$accessPolicy = accessPolicy?.reference ?? jni$_.jNullReference; - return _allowPolyglotAccess( - reference.pointer, - _id_allowPolyglotAccess as jni$_.JMethodIDPtr, - _$accessPolicy.pointer, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_allowValueSharing = _class.instanceMethodId( - r'allowValueSharing', - r'(Z)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _allowValueSharing = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int32,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - int, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder allowValueSharing(boolean enabled)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? allowValueSharing(bool enabled) { - return _allowValueSharing( - reference.pointer, - _id_allowValueSharing as jni$_.JMethodIDPtr, - enabled ? 1 : 0, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_allowInnerContextOptions = _class.instanceMethodId( - r'allowInnerContextOptions', - r'(Z)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _allowInnerContextOptions = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int32,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - int, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder allowInnerContextOptions(boolean enabled)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? allowInnerContextOptions(bool enabled) { - return _allowInnerContextOptions( - reference.pointer, - _id_allowInnerContextOptions as jni$_.JMethodIDPtr, - enabled ? 1 : 0, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_hostClassFilter = _class.instanceMethodId( - r'hostClassFilter', - r'(Ljava/util/function/Predicate;)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _hostClassFilter = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder hostClassFilter(java.util.function.Predicate classFilter)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? hostClassFilter(jni$_.JObject? classFilter) { - final _$classFilter = classFilter?.reference ?? jni$_.jNullReference; - return _hostClassFilter( - reference.pointer, - _id_hostClassFilter as jni$_.JMethodIDPtr, - _$classFilter.pointer, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_option = _class.instanceMethodId( - r'option', - r'(Ljava/lang/String;Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _option = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Pointer) - >, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder option(java.lang.String key, java.lang.String value)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? option(jni$_.JString? key, jni$_.JString? value) { - final _$key = key?.reference ?? jni$_.jNullReference; - final _$value = value?.reference ?? jni$_.jNullReference; - return _option( - reference.pointer, - _id_option as jni$_.JMethodIDPtr, - _$key.pointer, - _$value.pointer, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_options = _class.instanceMethodId( - r'options', - r'(Ljava/util/Map;)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _options = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder options(java.util.Map options)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? options( - jni$_.JMap? options, - ) { - final _$options = options?.reference ?? jni$_.jNullReference; - return _options( - reference.pointer, - _id_options as jni$_.JMethodIDPtr, - _$options.pointer, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_arguments = _class.instanceMethodId( - r'arguments', - r'(Ljava/lang/String;[Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _arguments = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Pointer) - >, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder arguments(java.lang.String language, java.lang.String[] args)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? arguments( - jni$_.JString? language, - jni$_.JArray? args, - ) { - final _$language = language?.reference ?? jni$_.jNullReference; - final _$args = args?.reference ?? jni$_.jNullReference; - return _arguments( - reference.pointer, - _id_arguments as jni$_.JMethodIDPtr, - _$language.pointer, - _$args.pointer, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_allowIO = _class.instanceMethodId( - r'allowIO', - r'(Lorg/graalvm/polyglot/io/IOAccess;)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _allowIO = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder allowIO(org.graalvm.polyglot.io.IOAccess ioAccess)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? allowIO(jni$_.JObject? ioAccess) { - final _$ioAccess = ioAccess?.reference ?? jni$_.jNullReference; - return _allowIO( - reference.pointer, - _id_allowIO as jni$_.JMethodIDPtr, - _$ioAccess.pointer, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_allowIO$1 = _class.instanceMethodId( - r'allowIO', - r'(Z)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _allowIO$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int32,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - int, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder allowIO(boolean enabled)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? allowIO$1(bool enabled) { - return _allowIO$1( - reference.pointer, - _id_allowIO$1 as jni$_.JMethodIDPtr, - enabled ? 1 : 0, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_fileSystem = _class.instanceMethodId( - r'fileSystem', - r'(Lorg/graalvm/polyglot/io/FileSystem;)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _fileSystem = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder fileSystem(org.graalvm.polyglot.io.FileSystem fileSystem)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? fileSystem(jni$_.JObject? fileSystem) { - final _$fileSystem = fileSystem?.reference ?? jni$_.jNullReference; - return _fileSystem( - reference.pointer, - _id_fileSystem as jni$_.JMethodIDPtr, - _$fileSystem.pointer, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_serverTransport = _class.instanceMethodId( - r'serverTransport', - r'(Lorg/graalvm/polyglot/io/MessageTransport;)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _serverTransport = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder serverTransport(org.graalvm.polyglot.io.MessageTransport serverTransport)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? serverTransport(jni$_.JObject? serverTransport) { - final _$serverTransport = - serverTransport?.reference ?? jni$_.jNullReference; - return _serverTransport( - reference.pointer, - _id_serverTransport as jni$_.JMethodIDPtr, - _$serverTransport.pointer, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_logHandler = _class.instanceMethodId( - r'logHandler', - r'(Ljava/util/logging/Handler;)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _logHandler = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder logHandler(java.util.logging.Handler logHandler)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? logHandler(jni$_.JObject? logHandler) { - final _$logHandler = logHandler?.reference ?? jni$_.jNullReference; - return _logHandler( - reference.pointer, - _id_logHandler as jni$_.JMethodIDPtr, - _$logHandler.pointer, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_timeZone = _class.instanceMethodId( - r'timeZone', - r'(Ljava/time/ZoneId;)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _timeZone = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder timeZone(java.time.ZoneId zone)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? timeZone(jni$_.JObject? zone) { - final _$zone = zone?.reference ?? jni$_.jNullReference; - return _timeZone( - reference.pointer, - _id_timeZone as jni$_.JMethodIDPtr, - _$zone.pointer, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_logHandler$1 = _class.instanceMethodId( - r'logHandler', - r'(Ljava/io/OutputStream;)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _logHandler$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder logHandler(java.io.OutputStream logOut)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? logHandler$1(jni$_.JObject? logOut) { - final _$logOut = logOut?.reference ?? jni$_.jNullReference; - return _logHandler$1( - reference.pointer, - _id_logHandler$1 as jni$_.JMethodIDPtr, - _$logOut.pointer, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_allowCreateProcess = _class.instanceMethodId( - r'allowCreateProcess', - r'(Z)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _allowCreateProcess = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int32,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - int, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder allowCreateProcess(boolean enabled)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? allowCreateProcess(bool enabled) { - return _allowCreateProcess( - reference.pointer, - _id_allowCreateProcess as jni$_.JMethodIDPtr, - enabled ? 1 : 0, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_processHandler = _class.instanceMethodId( - r'processHandler', - r'(Lorg/graalvm/polyglot/io/ProcessHandler;)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _processHandler = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder processHandler(org.graalvm.polyglot.io.ProcessHandler handler)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? processHandler(jni$_.JObject? handler) { - final _$handler = handler?.reference ?? jni$_.jNullReference; - return _processHandler( - reference.pointer, - _id_processHandler as jni$_.JMethodIDPtr, - _$handler.pointer, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_resourceLimits = _class.instanceMethodId( - r'resourceLimits', - r'(Lorg/graalvm/polyglot/ResourceLimits;)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _resourceLimits = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder resourceLimits(org.graalvm.polyglot.ResourceLimits limits)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? resourceLimits(jni$_.JObject? limits) { - final _$limits = limits?.reference ?? jni$_.jNullReference; - return _resourceLimits( - reference.pointer, - _id_resourceLimits as jni$_.JMethodIDPtr, - _$limits.pointer, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_sandbox = _class.instanceMethodId( - r'sandbox', - r'(Lorg/graalvm/polyglot/SandboxPolicy;)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _sandbox = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder sandbox(org.graalvm.polyglot.SandboxPolicy policy)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? sandbox(jni$_.JObject? policy) { - final _$policy = policy?.reference ?? jni$_.jNullReference; - return _sandbox( - reference.pointer, - _id_sandbox as jni$_.JMethodIDPtr, - _$policy.pointer, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_allowEnvironmentAccess = _class.instanceMethodId( - r'allowEnvironmentAccess', - r'(Lorg/graalvm/polyglot/EnvironmentAccess;)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _allowEnvironmentAccess = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder allowEnvironmentAccess(org.graalvm.polyglot.EnvironmentAccess accessPolicy)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? allowEnvironmentAccess(jni$_.JObject? accessPolicy) { - final _$accessPolicy = accessPolicy?.reference ?? jni$_.jNullReference; - return _allowEnvironmentAccess( - reference.pointer, - _id_allowEnvironmentAccess as jni$_.JMethodIDPtr, - _$accessPolicy.pointer, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_environment = _class.instanceMethodId( - r'environment', - r'(Ljava/lang/String;Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _environment = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Pointer) - >, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder environment(java.lang.String name, java.lang.String value)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? environment(jni$_.JString? name, jni$_.JString? value) { - final _$name = name?.reference ?? jni$_.jNullReference; - final _$value = value?.reference ?? jni$_.jNullReference; - return _environment( - reference.pointer, - _id_environment as jni$_.JMethodIDPtr, - _$name.pointer, - _$value.pointer, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_environment$1 = _class.instanceMethodId( - r'environment', - r'(Ljava/util/Map;)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _environment$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder environment(java.util.Map env)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? environment$1( - jni$_.JMap? env, - ) { - final _$env = env?.reference ?? jni$_.jNullReference; - return _environment$1( - reference.pointer, - _id_environment$1 as jni$_.JMethodIDPtr, - _$env.pointer, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_currentWorkingDirectory = _class.instanceMethodId( - r'currentWorkingDirectory', - r'(Ljava/nio/file/Path;)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _currentWorkingDirectory = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder currentWorkingDirectory(java.nio.file.Path workingDirectory)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? currentWorkingDirectory(jni$_.JObject? workingDirectory) { - final _$workingDirectory = - workingDirectory?.reference ?? jni$_.jNullReference; - return _currentWorkingDirectory( - reference.pointer, - _id_currentWorkingDirectory as jni$_.JMethodIDPtr, - _$workingDirectory.pointer, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_hostClassLoader = _class.instanceMethodId( - r'hostClassLoader', - r'(Ljava/lang/ClassLoader;)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _hostClassLoader = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder hostClassLoader(java.lang.ClassLoader classLoader)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? hostClassLoader(jni$_.JObject? classLoader) { - final _$classLoader = classLoader?.reference ?? jni$_.jNullReference; - return _hostClassLoader( - reference.pointer, - _id_hostClassLoader as jni$_.JMethodIDPtr, - _$classLoader.pointer, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_useSystemExit = _class.instanceMethodId( - r'useSystemExit', - r'(Z)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _useSystemExit = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int32,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - int, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context$Builder useSystemExit(boolean enabled)` - /// The returned object must be released after use, by calling the [release] method. - Context$Builder? useSystemExit(bool enabled) { - return _useSystemExit( - reference.pointer, - _id_useSystemExit as jni$_.JMethodIDPtr, - enabled ? 1 : 0, - ).object(const $Context$Builder$NullableType()); - } - - static final _id_build = _class.instanceMethodId( - r'build', - r'()Lorg/graalvm/polyglot/Context;', - ); - - static final _build = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context build()` - /// The returned object must be released after use, by calling the [release] method. - Context? build() { - return _build( - reference.pointer, - _id_build as jni$_.JMethodIDPtr, - ).object(const $Context$NullableType()); - } -} - -final class $Context$Builder$NullableType - extends jni$_.JObjType { - @jni$_.internal - const $Context$Builder$NullableType(); - - @jni$_.internal - @core$_.override - String get signature => r'Lorg/graalvm/polyglot/Context$Builder;'; - - @jni$_.internal - @core$_.override - Context$Builder? fromReference(jni$_.JReference reference) => - reference.isNull ? null : Context$Builder.fromReference(reference); - @jni$_.internal - @core$_.override - jni$_.JObjType get superType => const jni$_.JObjectNullableType(); - - @jni$_.internal - @core$_.override - jni$_.JObjType get nullableType => this; - - @jni$_.internal - @core$_.override - final superCount = 1; - - @core$_.override - int get hashCode => ($Context$Builder$NullableType).hashCode; - - @core$_.override - bool operator ==(Object other) { - return other.runtimeType == ($Context$Builder$NullableType) && - other is $Context$Builder$NullableType; - } -} - -final class $Context$Builder$Type extends jni$_.JObjType { - @jni$_.internal - const $Context$Builder$Type(); - - @jni$_.internal - @core$_.override - String get signature => r'Lorg/graalvm/polyglot/Context$Builder;'; - - @jni$_.internal - @core$_.override - Context$Builder fromReference(jni$_.JReference reference) => - Context$Builder.fromReference(reference); - @jni$_.internal - @core$_.override - jni$_.JObjType get superType => const jni$_.JObjectNullableType(); - - @jni$_.internal - @core$_.override - jni$_.JObjType get nullableType => - const $Context$Builder$NullableType(); - - @jni$_.internal - @core$_.override - final superCount = 1; - - @core$_.override - int get hashCode => ($Context$Builder$Type).hashCode; - - @core$_.override - bool operator ==(Object other) { - return other.runtimeType == ($Context$Builder$Type) && - other is $Context$Builder$Type; - } -} - -/// from: `org.graalvm.polyglot.Context` -class Context extends jni$_.JObject { - @jni$_.internal - @core$_.override - final jni$_.JObjType $type; - - @jni$_.internal - Context.fromReference(jni$_.JReference reference) - : $type = type, - super.fromReference(reference); - - static final _class = jni$_.JClass.forName(r'org/graalvm/polyglot/Context'); - - /// The type which includes information such as the signature of this class. - static const nullableType = $Context$NullableType(); - static const type = $Context$Type(); - static final _id_getEngine = _class.instanceMethodId( - r'getEngine', - r'()Lorg/graalvm/polyglot/Engine;', - ); - - static final _getEngine = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public org.graalvm.polyglot.Engine getEngine()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? getEngine() { - return _getEngine( - reference.pointer, - _id_getEngine as jni$_.JMethodIDPtr, - ).object(const jni$_.JObjectNullableType()); - } - - static final _id_eval = _class.instanceMethodId( - r'eval', - r'(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;', - ); - - static final _eval = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Value eval(org.graalvm.polyglot.Source source)` - /// The returned object must be released after use, by calling the [release] method. - value$_.Value? eval(jni$_.JObject? source) { - final _$source = source?.reference ?? jni$_.jNullReference; - return _eval( - reference.pointer, - _id_eval as jni$_.JMethodIDPtr, - _$source.pointer, - ).object(const value$_.$Value$NullableType()); - } - - static final _id_eval$1 = _class.instanceMethodId( - r'eval', - r'(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;', - ); - - static final _eval$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Pointer) - >, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Value eval(java.lang.String languageId, java.lang.CharSequence source)` - /// The returned object must be released after use, by calling the [release] method. - value$_.Value? eval$1(jni$_.JString? languageId, jni$_.JObject? source) { - final _$languageId = languageId?.reference ?? jni$_.jNullReference; - final _$source = source?.reference ?? jni$_.jNullReference; - return _eval$1( - reference.pointer, - _id_eval$1 as jni$_.JMethodIDPtr, - _$languageId.pointer, - _$source.pointer, - ).object(const value$_.$Value$NullableType()); - } - - static final _id_parse = _class.instanceMethodId( - r'parse', - r'(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;', - ); - - static final _parse = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Value parse(org.graalvm.polyglot.Source source)` - /// The returned object must be released after use, by calling the [release] method. - value$_.Value? parse(jni$_.JObject? source) { - final _$source = source?.reference ?? jni$_.jNullReference; - return _parse( - reference.pointer, - _id_parse as jni$_.JMethodIDPtr, - _$source.pointer, - ).object(const value$_.$Value$NullableType()); - } - - static final _id_parse$1 = _class.instanceMethodId( - r'parse', - r'(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;', - ); - - static final _parse$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Pointer) - >, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Value parse(java.lang.String languageId, java.lang.CharSequence source)` - /// The returned object must be released after use, by calling the [release] method. - value$_.Value? parse$1(jni$_.JString? languageId, jni$_.JObject? source) { - final _$languageId = languageId?.reference ?? jni$_.jNullReference; - final _$source = source?.reference ?? jni$_.jNullReference; - return _parse$1( - reference.pointer, - _id_parse$1 as jni$_.JMethodIDPtr, - _$languageId.pointer, - _$source.pointer, - ).object(const value$_.$Value$NullableType()); - } - - static final _id_getPolyglotBindings = _class.instanceMethodId( - r'getPolyglotBindings', - r'()Lorg/graalvm/polyglot/Value;', - ); - - static final _getPolyglotBindings = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public org.graalvm.polyglot.Value getPolyglotBindings()` - /// The returned object must be released after use, by calling the [release] method. - value$_.Value? getPolyglotBindings() { - return _getPolyglotBindings( - reference.pointer, - _id_getPolyglotBindings as jni$_.JMethodIDPtr, - ).object(const value$_.$Value$NullableType()); - } - - static final _id_getBindings = _class.instanceMethodId( - r'getBindings', - r'(Ljava/lang/String;)Lorg/graalvm/polyglot/Value;', - ); - - static final _getBindings = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Value getBindings(java.lang.String languageId)` - /// The returned object must be released after use, by calling the [release] method. - value$_.Value? getBindings(jni$_.JString? languageId) { - final _$languageId = languageId?.reference ?? jni$_.jNullReference; - return _getBindings( - reference.pointer, - _id_getBindings as jni$_.JMethodIDPtr, - _$languageId.pointer, - ).object(const value$_.$Value$NullableType()); - } - - static final _id_initialize = _class.instanceMethodId( - r'initialize', - r'(Ljava/lang/String;)Z', - ); - - static final _initialize = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public boolean initialize(java.lang.String languageId)` - bool initialize(jni$_.JString? languageId) { - final _$languageId = languageId?.reference ?? jni$_.jNullReference; - return _initialize( - reference.pointer, - _id_initialize as jni$_.JMethodIDPtr, - _$languageId.pointer, - ).boolean; - } - - static final _id_resetLimits = _class.instanceMethodId( - r'resetLimits', - r'()V', - ); - - static final _resetLimits = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public void resetLimits()` - void resetLimits() { - _resetLimits( - reference.pointer, - _id_resetLimits as jni$_.JMethodIDPtr, - ).check(); - } - - static final _id_asValue = _class.instanceMethodId( - r'asValue', - r'(Ljava/lang/Object;)Lorg/graalvm/polyglot/Value;', - ); - - static final _asValue = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Value asValue(java.lang.Object hostValue)` - /// The returned object must be released after use, by calling the [release] method. - value$_.Value? asValue(jni$_.JObject? hostValue) { - final _$hostValue = hostValue?.reference ?? jni$_.jNullReference; - return _asValue( - reference.pointer, - _id_asValue as jni$_.JMethodIDPtr, - _$hostValue.pointer, - ).object(const value$_.$Value$NullableType()); - } - - static final _id_enter = _class.instanceMethodId(r'enter', r'()V'); - - static final _enter = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public void enter()` - void enter() { - _enter(reference.pointer, _id_enter as jni$_.JMethodIDPtr).check(); - } - - static final _id_equals = _class.instanceMethodId( - r'equals', - r'(Ljava/lang/Object;)Z', - ); - - static final _equals = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public boolean equals(java.lang.Object obj)` - bool equals(jni$_.JObject? obj) { - final _$obj = obj?.reference ?? jni$_.jNullReference; - return _equals( - reference.pointer, - _id_equals as jni$_.JMethodIDPtr, - _$obj.pointer, - ).boolean; - } - - static final _id_hashCode$1 = _class.instanceMethodId(r'hashCode', r'()I'); - - static final _hashCode$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallIntMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public int hashCode()` - int hashCode$1() { - return _hashCode$1( - reference.pointer, - _id_hashCode$1 as jni$_.JMethodIDPtr, - ).integer; - } - - static final _id_leave = _class.instanceMethodId(r'leave', r'()V'); - - static final _leave = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public void leave()` - void leave() { - _leave(reference.pointer, _id_leave as jni$_.JMethodIDPtr).check(); - } - - static final _id_close = _class.instanceMethodId(r'close', r'(Z)V'); - - static final _close = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int32,)>, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - int, - ) - >(); - - /// from: `public void close(boolean cancelIfExecuting)` - void close(bool cancelIfExecuting) { - _close( - reference.pointer, - _id_close as jni$_.JMethodIDPtr, - cancelIfExecuting ? 1 : 0, - ).check(); - } - - static final _id_close$1 = _class.instanceMethodId(r'close', r'()V'); - - static final _close$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public void close()` - void close$1() { - _close$1(reference.pointer, _id_close$1 as jni$_.JMethodIDPtr).check(); - } - - static final _id_interrupt = _class.instanceMethodId( - r'interrupt', - r'(Ljava/time/Duration;)V', - ); - - static final _interrupt = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public void interrupt(java.time.Duration timeout)` - void interrupt(jni$_.JObject? timeout) { - final _$timeout = timeout?.reference ?? jni$_.jNullReference; - _interrupt( - reference.pointer, - _id_interrupt as jni$_.JMethodIDPtr, - _$timeout.pointer, - ).check(); - } - - static final _id_safepoint = _class.instanceMethodId(r'safepoint', r'()V'); - - static final _safepoint = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public void safepoint()` - void safepoint() { - _safepoint(reference.pointer, _id_safepoint as jni$_.JMethodIDPtr).check(); - } - - static final _id_getCurrent = _class.staticMethodId( - r'getCurrent', - r'()Lorg/graalvm/polyglot/Context;', - ); - - static final _getCurrent = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallStaticObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `static public org.graalvm.polyglot.Context getCurrent()` - /// The returned object must be released after use, by calling the [release] method. - static Context? getCurrent() { - return _getCurrent( - _class.reference.pointer, - _id_getCurrent as jni$_.JMethodIDPtr, - ).object(const $Context$NullableType()); - } - - static final _id_create = _class.staticMethodId( - r'create', - r'([Ljava/lang/String;)Lorg/graalvm/polyglot/Context;', - ); - - static final _create = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallStaticObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `static public org.graalvm.polyglot.Context create(java.lang.String[] permittedLanguages)` - /// The returned object must be released after use, by calling the [release] method. - static Context? create(jni$_.JArray? permittedLanguages) { - final _$permittedLanguages = - permittedLanguages?.reference ?? jni$_.jNullReference; - return _create( - _class.reference.pointer, - _id_create as jni$_.JMethodIDPtr, - _$permittedLanguages.pointer, - ).object(const $Context$NullableType()); - } - - static final _id_newBuilder = _class.staticMethodId( - r'newBuilder', - r'([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;', - ); - - static final _newBuilder = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallStaticObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `static public org.graalvm.polyglot.Context$Builder newBuilder(java.lang.String[] permittedLanguages)` - /// The returned object must be released after use, by calling the [release] method. - static Context$Builder? newBuilder( - jni$_.JArray? permittedLanguages, - ) { - final _$permittedLanguages = - permittedLanguages?.reference ?? jni$_.jNullReference; - return _newBuilder( - _class.reference.pointer, - _id_newBuilder as jni$_.JMethodIDPtr, - _$permittedLanguages.pointer, - ).object(const $Context$Builder$NullableType()); - } -} - -final class $Context$NullableType extends jni$_.JObjType { - @jni$_.internal - const $Context$NullableType(); - - @jni$_.internal - @core$_.override - String get signature => r'Lorg/graalvm/polyglot/Context;'; - - @jni$_.internal - @core$_.override - Context? fromReference(jni$_.JReference reference) => - reference.isNull ? null : Context.fromReference(reference); - @jni$_.internal - @core$_.override - jni$_.JObjType get superType => const jni$_.JObjectNullableType(); - - @jni$_.internal - @core$_.override - jni$_.JObjType get nullableType => this; - - @jni$_.internal - @core$_.override - final superCount = 1; - - @core$_.override - int get hashCode => ($Context$NullableType).hashCode; - - @core$_.override - bool operator ==(Object other) { - return other.runtimeType == ($Context$NullableType) && - other is $Context$NullableType; - } -} - -final class $Context$Type extends jni$_.JObjType { - @jni$_.internal - const $Context$Type(); - - @jni$_.internal - @core$_.override - String get signature => r'Lorg/graalvm/polyglot/Context;'; - - @jni$_.internal - @core$_.override - Context fromReference(jni$_.JReference reference) => - Context.fromReference(reference); - @jni$_.internal - @core$_.override - jni$_.JObjType get superType => const jni$_.JObjectNullableType(); - - @jni$_.internal - @core$_.override - jni$_.JObjType get nullableType => const $Context$NullableType(); - - @jni$_.internal - @core$_.override - final superCount = 1; - - @core$_.override - int get hashCode => ($Context$Type).hashCode; - - @core$_.override - bool operator ==(Object other) { - return other.runtimeType == ($Context$Type) && other is $Context$Type; - } -} diff --git a/graalvm_test/lib/graal/org/graalvm/polyglot/Value.dart b/graalvm_test/lib/graal/org/graalvm/polyglot/Value.dart deleted file mode 100644 index 31f9454..0000000 --- a/graalvm_test/lib/graal/org/graalvm/polyglot/Value.dart +++ /dev/null @@ -1,3680 +0,0 @@ -// AUTO GENERATED BY JNIGEN 0.14.2. 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 -// ignore_for_file: comment_references -// ignore_for_file: doc_directive_unknown -// ignore_for_file: file_names -// ignore_for_file: inference_failure_on_untyped_parameter -// ignore_for_file: invalid_internal_annotation -// ignore_for_file: invalid_use_of_internal_member -// ignore_for_file: library_prefixes -// ignore_for_file: lines_longer_than_80_chars -// ignore_for_file: no_leading_underscores_for_library_prefixes -// 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: unintended_html_in_doc_comment -// ignore_for_file: unnecessary_cast -// ignore_for_file: unnecessary_non_null_assertion -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: unused_element -// ignore_for_file: unused_field -// ignore_for_file: unused_import -// ignore_for_file: unused_local_variable -// ignore_for_file: unused_shown_name -// ignore_for_file: use_super_parameters - -import 'dart:core' show Object, String, bool, double, int; -import 'dart:core' as core$_; - -import 'package:jni/_internal.dart' as jni$_; -import 'package:jni/jni.dart' as jni$_; - -import 'Context.dart' as context$_; - -/// from: `org.graalvm.polyglot.Value$StringEncoding` -class Value$StringEncoding extends jni$_.JObject { - @jni$_.internal - @core$_.override - final jni$_.JObjType $type; - - @jni$_.internal - Value$StringEncoding.fromReference(jni$_.JReference reference) - : $type = type, - super.fromReference(reference); - - static final _class = jni$_.JClass.forName( - r'org/graalvm/polyglot/Value$StringEncoding', - ); - - /// The type which includes information such as the signature of this class. - static const nullableType = $Value$StringEncoding$NullableType(); - static const type = $Value$StringEncoding$Type(); - static final _id_UTF_8 = _class.staticFieldId( - r'UTF_8', - r'Lorg/graalvm/polyglot/Value$StringEncoding;', - ); - - /// from: `static public final org.graalvm.polyglot.Value$StringEncoding UTF_8` - /// The returned object must be released after use, by calling the [release] method. - static Value$StringEncoding? get UTF_8 => - _id_UTF_8.get(_class, const $Value$StringEncoding$NullableType()); - - static final _id_UTF_16_LITTLE_ENDIAN = _class.staticFieldId( - r'UTF_16_LITTLE_ENDIAN', - r'Lorg/graalvm/polyglot/Value$StringEncoding;', - ); - - /// from: `static public final org.graalvm.polyglot.Value$StringEncoding UTF_16_LITTLE_ENDIAN` - /// The returned object must be released after use, by calling the [release] method. - static Value$StringEncoding? get UTF_16_LITTLE_ENDIAN => - _id_UTF_16_LITTLE_ENDIAN.get( - _class, - const $Value$StringEncoding$NullableType(), - ); - - static final _id_UTF_16_BIG_ENDIAN = _class.staticFieldId( - r'UTF_16_BIG_ENDIAN', - r'Lorg/graalvm/polyglot/Value$StringEncoding;', - ); - - /// from: `static public final org.graalvm.polyglot.Value$StringEncoding UTF_16_BIG_ENDIAN` - /// The returned object must be released after use, by calling the [release] method. - static Value$StringEncoding? get UTF_16_BIG_ENDIAN => _id_UTF_16_BIG_ENDIAN - .get(_class, const $Value$StringEncoding$NullableType()); - - static final _id_UTF_32_LITTLE_ENDIAN = _class.staticFieldId( - r'UTF_32_LITTLE_ENDIAN', - r'Lorg/graalvm/polyglot/Value$StringEncoding;', - ); - - /// from: `static public final org.graalvm.polyglot.Value$StringEncoding UTF_32_LITTLE_ENDIAN` - /// The returned object must be released after use, by calling the [release] method. - static Value$StringEncoding? get UTF_32_LITTLE_ENDIAN => - _id_UTF_32_LITTLE_ENDIAN.get( - _class, - const $Value$StringEncoding$NullableType(), - ); - - static final _id_UTF_32_BIG_ENDIAN = _class.staticFieldId( - r'UTF_32_BIG_ENDIAN', - r'Lorg/graalvm/polyglot/Value$StringEncoding;', - ); - - /// from: `static public final org.graalvm.polyglot.Value$StringEncoding UTF_32_BIG_ENDIAN` - /// The returned object must be released after use, by calling the [release] method. - static Value$StringEncoding? get UTF_32_BIG_ENDIAN => _id_UTF_32_BIG_ENDIAN - .get(_class, const $Value$StringEncoding$NullableType()); - - static final _id_UTF_16 = _class.staticFieldId( - r'UTF_16', - r'Lorg/graalvm/polyglot/Value$StringEncoding;', - ); - - /// from: `static public final org.graalvm.polyglot.Value$StringEncoding UTF_16` - /// The returned object must be released after use, by calling the [release] method. - static Value$StringEncoding? get UTF_16 => - _id_UTF_16.get(_class, const $Value$StringEncoding$NullableType()); - - static final _id_UTF_32 = _class.staticFieldId( - r'UTF_32', - r'Lorg/graalvm/polyglot/Value$StringEncoding;', - ); - - /// from: `static public final org.graalvm.polyglot.Value$StringEncoding UTF_32` - /// The returned object must be released after use, by calling the [release] method. - static Value$StringEncoding? get UTF_32 => - _id_UTF_32.get(_class, const $Value$StringEncoding$NullableType()); -} - -final class $Value$StringEncoding$NullableType - extends jni$_.JObjType { - @jni$_.internal - const $Value$StringEncoding$NullableType(); - - @jni$_.internal - @core$_.override - String get signature => r'Lorg/graalvm/polyglot/Value$StringEncoding;'; - - @jni$_.internal - @core$_.override - Value$StringEncoding? fromReference(jni$_.JReference reference) => - reference.isNull ? null : Value$StringEncoding.fromReference(reference); - @jni$_.internal - @core$_.override - jni$_.JObjType get superType => const jni$_.JObjectNullableType(); - - @jni$_.internal - @core$_.override - jni$_.JObjType get nullableType => this; - - @jni$_.internal - @core$_.override - final superCount = 1; - - @core$_.override - int get hashCode => ($Value$StringEncoding$NullableType).hashCode; - - @core$_.override - bool operator ==(Object other) { - return other.runtimeType == ($Value$StringEncoding$NullableType) && - other is $Value$StringEncoding$NullableType; - } -} - -final class $Value$StringEncoding$Type - extends jni$_.JObjType { - @jni$_.internal - const $Value$StringEncoding$Type(); - - @jni$_.internal - @core$_.override - String get signature => r'Lorg/graalvm/polyglot/Value$StringEncoding;'; - - @jni$_.internal - @core$_.override - Value$StringEncoding fromReference(jni$_.JReference reference) => - Value$StringEncoding.fromReference(reference); - @jni$_.internal - @core$_.override - jni$_.JObjType get superType => const jni$_.JObjectNullableType(); - - @jni$_.internal - @core$_.override - jni$_.JObjType get nullableType => - const $Value$StringEncoding$NullableType(); - - @jni$_.internal - @core$_.override - final superCount = 1; - - @core$_.override - int get hashCode => ($Value$StringEncoding$Type).hashCode; - - @core$_.override - bool operator ==(Object other) { - return other.runtimeType == ($Value$StringEncoding$Type) && - other is $Value$StringEncoding$Type; - } -} - -/// from: `org.graalvm.polyglot.Value` -class Value extends jni$_.JObject { - @jni$_.internal - @core$_.override - final jni$_.JObjType $type; - - @jni$_.internal - Value.fromReference(jni$_.JReference reference) - : $type = type, - super.fromReference(reference); - - static final _class = jni$_.JClass.forName(r'org/graalvm/polyglot/Value'); - - /// The type which includes information such as the signature of this class. - static const nullableType = $Value$NullableType(); - static const type = $Value$Type(); - static final _id_getMetaObject = _class.instanceMethodId( - r'getMetaObject', - r'()Lorg/graalvm/polyglot/Value;', - ); - - static final _getMetaObject = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public org.graalvm.polyglot.Value getMetaObject()` - /// The returned object must be released after use, by calling the [release] method. - Value? getMetaObject() { - return _getMetaObject( - reference.pointer, - _id_getMetaObject as jni$_.JMethodIDPtr, - ).object(const $Value$NullableType()); - } - - static final _id_isMetaObject = _class.instanceMethodId( - r'isMetaObject', - r'()Z', - ); - - static final _isMetaObject = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean isMetaObject()` - bool isMetaObject() { - return _isMetaObject( - reference.pointer, - _id_isMetaObject as jni$_.JMethodIDPtr, - ).boolean; - } - - static final _id_getMetaQualifiedName = _class.instanceMethodId( - r'getMetaQualifiedName', - r'()Ljava/lang/String;', - ); - - static final _getMetaQualifiedName = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public java.lang.String getMetaQualifiedName()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JString? getMetaQualifiedName() { - return _getMetaQualifiedName( - reference.pointer, - _id_getMetaQualifiedName as jni$_.JMethodIDPtr, - ).object(const jni$_.JStringNullableType()); - } - - static final _id_getMetaSimpleName = _class.instanceMethodId( - r'getMetaSimpleName', - r'()Ljava/lang/String;', - ); - - static final _getMetaSimpleName = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public java.lang.String getMetaSimpleName()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JString? getMetaSimpleName() { - return _getMetaSimpleName( - reference.pointer, - _id_getMetaSimpleName as jni$_.JMethodIDPtr, - ).object(const jni$_.JStringNullableType()); - } - - static final _id_isMetaInstance = _class.instanceMethodId( - r'isMetaInstance', - r'(Ljava/lang/Object;)Z', - ); - - static final _isMetaInstance = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public boolean isMetaInstance(java.lang.Object instance)` - bool isMetaInstance(jni$_.JObject? instance) { - final _$instance = instance?.reference ?? jni$_.jNullReference; - return _isMetaInstance( - reference.pointer, - _id_isMetaInstance as jni$_.JMethodIDPtr, - _$instance.pointer, - ).boolean; - } - - static final _id_hasMetaParents = _class.instanceMethodId( - r'hasMetaParents', - r'()Z', - ); - - static final _hasMetaParents = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean hasMetaParents()` - bool hasMetaParents() { - return _hasMetaParents( - reference.pointer, - _id_hasMetaParents as jni$_.JMethodIDPtr, - ).boolean; - } - - static final _id_getMetaParents = _class.instanceMethodId( - r'getMetaParents', - r'()Lorg/graalvm/polyglot/Value;', - ); - - static final _getMetaParents = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public org.graalvm.polyglot.Value getMetaParents()` - /// The returned object must be released after use, by calling the [release] method. - Value? getMetaParents() { - return _getMetaParents( - reference.pointer, - _id_getMetaParents as jni$_.JMethodIDPtr, - ).object(const $Value$NullableType()); - } - - static final _id_hasArrayElements = _class.instanceMethodId( - r'hasArrayElements', - r'()Z', - ); - - static final _hasArrayElements = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean hasArrayElements()` - bool hasArrayElements() { - return _hasArrayElements( - reference.pointer, - _id_hasArrayElements as jni$_.JMethodIDPtr, - ).boolean; - } - - static final _id_getArrayElement = _class.instanceMethodId( - r'getArrayElement', - r'(J)Lorg/graalvm/polyglot/Value;', - ); - - static final _getArrayElement = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int64,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - int, - ) - >(); - - /// from: `public org.graalvm.polyglot.Value getArrayElement(long index)` - /// The returned object must be released after use, by calling the [release] method. - Value? getArrayElement(int index) { - return _getArrayElement( - reference.pointer, - _id_getArrayElement as jni$_.JMethodIDPtr, - index, - ).object(const $Value$NullableType()); - } - - static final _id_setArrayElement = _class.instanceMethodId( - r'setArrayElement', - r'(JLjava/lang/Object;)V', - ); - - static final _setArrayElement = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int64, jni$_.Pointer)>, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - int, - jni$_.Pointer, - ) - >(); - - /// from: `public void setArrayElement(long index, java.lang.Object value)` - void setArrayElement(int index, jni$_.JObject? value) { - final _$value = value?.reference ?? jni$_.jNullReference; - _setArrayElement( - reference.pointer, - _id_setArrayElement as jni$_.JMethodIDPtr, - index, - _$value.pointer, - ).check(); - } - - static final _id_removeArrayElement = _class.instanceMethodId( - r'removeArrayElement', - r'(J)Z', - ); - - static final _removeArrayElement = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int64,)>, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - int, - ) - >(); - - /// from: `public boolean removeArrayElement(long index)` - bool removeArrayElement(int index) { - return _removeArrayElement( - reference.pointer, - _id_removeArrayElement as jni$_.JMethodIDPtr, - index, - ).boolean; - } - - static final _id_getArraySize = _class.instanceMethodId( - r'getArraySize', - r'()J', - ); - - static final _getArraySize = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallLongMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public long getArraySize()` - int getArraySize() { - return _getArraySize( - reference.pointer, - _id_getArraySize as jni$_.JMethodIDPtr, - ).long; - } - - static final _id_hasBufferElements = _class.instanceMethodId( - r'hasBufferElements', - r'()Z', - ); - - static final _hasBufferElements = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean hasBufferElements()` - bool hasBufferElements() { - return _hasBufferElements( - reference.pointer, - _id_hasBufferElements as jni$_.JMethodIDPtr, - ).boolean; - } - - static final _id_isBufferWritable = _class.instanceMethodId( - r'isBufferWritable', - r'()Z', - ); - - static final _isBufferWritable = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean isBufferWritable()` - bool isBufferWritable() { - return _isBufferWritable( - reference.pointer, - _id_isBufferWritable as jni$_.JMethodIDPtr, - ).boolean; - } - - static final _id_getBufferSize = _class.instanceMethodId( - r'getBufferSize', - r'()J', - ); - - static final _getBufferSize = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallLongMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public long getBufferSize()` - int getBufferSize() { - return _getBufferSize( - reference.pointer, - _id_getBufferSize as jni$_.JMethodIDPtr, - ).long; - } - - static final _id_readBufferByte = _class.instanceMethodId( - r'readBufferByte', - r'(J)B', - ); - - static final _readBufferByte = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int64,)>, - ) - > - >('globalEnv_CallByteMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - int, - ) - >(); - - /// from: `public byte readBufferByte(long byteOffset)` - int readBufferByte(int byteOffset) { - return _readBufferByte( - reference.pointer, - _id_readBufferByte as jni$_.JMethodIDPtr, - byteOffset, - ).byte; - } - - static final _id_readBuffer = _class.instanceMethodId( - r'readBuffer', - r'(J[BII)V', - ); - - static final _readBuffer = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Int64, - jni$_.Pointer, - jni$_.Int32, - jni$_.Int32, - ) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - int, - jni$_.Pointer, - int, - int, - ) - >(); - - /// from: `public void readBuffer(long byteOffset, byte[] destination, int destinationOffset, int length)` - void readBuffer( - int byteOffset, - jni$_.JByteArray? destination, - int destinationOffset, - int length, - ) { - final _$destination = destination?.reference ?? jni$_.jNullReference; - _readBuffer( - reference.pointer, - _id_readBuffer as jni$_.JMethodIDPtr, - byteOffset, - _$destination.pointer, - destinationOffset, - length, - ).check(); - } - - static final _id_writeBufferByte = _class.instanceMethodId( - r'writeBufferByte', - r'(JB)V', - ); - - static final _writeBufferByte = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int64, jni$_.Int32)>, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - int, - int, - ) - >(); - - /// from: `public void writeBufferByte(long byteOffset, byte value)` - void writeBufferByte(int byteOffset, int value) { - _writeBufferByte( - reference.pointer, - _id_writeBufferByte as jni$_.JMethodIDPtr, - byteOffset, - value, - ).check(); - } - - static final _id_readBufferShort = _class.instanceMethodId( - r'readBufferShort', - r'(Ljava/nio/ByteOrder;J)S', - ); - - static final _readBufferShort = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer, jni$_.Int64)>, - ) - > - >('globalEnv_CallShortMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - int, - ) - >(); - - /// from: `public short readBufferShort(java.nio.ByteOrder order, long byteOffset)` - int readBufferShort(jni$_.JObject? order, int byteOffset) { - final _$order = order?.reference ?? jni$_.jNullReference; - return _readBufferShort( - reference.pointer, - _id_readBufferShort as jni$_.JMethodIDPtr, - _$order.pointer, - byteOffset, - ).short; - } - - static final _id_writeBufferShort = _class.instanceMethodId( - r'writeBufferShort', - r'(Ljava/nio/ByteOrder;JS)V', - ); - - static final _writeBufferShort = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Int64, jni$_.Int32) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - int, - int, - ) - >(); - - /// from: `public void writeBufferShort(java.nio.ByteOrder order, long byteOffset, short value)` - void writeBufferShort(jni$_.JObject? order, int byteOffset, int value) { - final _$order = order?.reference ?? jni$_.jNullReference; - _writeBufferShort( - reference.pointer, - _id_writeBufferShort as jni$_.JMethodIDPtr, - _$order.pointer, - byteOffset, - value, - ).check(); - } - - static final _id_readBufferInt = _class.instanceMethodId( - r'readBufferInt', - r'(Ljava/nio/ByteOrder;J)I', - ); - - static final _readBufferInt = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer, jni$_.Int64)>, - ) - > - >('globalEnv_CallIntMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - int, - ) - >(); - - /// from: `public int readBufferInt(java.nio.ByteOrder order, long byteOffset)` - int readBufferInt(jni$_.JObject? order, int byteOffset) { - final _$order = order?.reference ?? jni$_.jNullReference; - return _readBufferInt( - reference.pointer, - _id_readBufferInt as jni$_.JMethodIDPtr, - _$order.pointer, - byteOffset, - ).integer; - } - - static final _id_writeBufferInt = _class.instanceMethodId( - r'writeBufferInt', - r'(Ljava/nio/ByteOrder;JI)V', - ); - - static final _writeBufferInt = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Int64, jni$_.Int32) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - int, - int, - ) - >(); - - /// from: `public void writeBufferInt(java.nio.ByteOrder order, long byteOffset, int value)` - void writeBufferInt(jni$_.JObject? order, int byteOffset, int value) { - final _$order = order?.reference ?? jni$_.jNullReference; - _writeBufferInt( - reference.pointer, - _id_writeBufferInt as jni$_.JMethodIDPtr, - _$order.pointer, - byteOffset, - value, - ).check(); - } - - static final _id_readBufferLong = _class.instanceMethodId( - r'readBufferLong', - r'(Ljava/nio/ByteOrder;J)J', - ); - - static final _readBufferLong = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer, jni$_.Int64)>, - ) - > - >('globalEnv_CallLongMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - int, - ) - >(); - - /// from: `public long readBufferLong(java.nio.ByteOrder order, long byteOffset)` - int readBufferLong(jni$_.JObject? order, int byteOffset) { - final _$order = order?.reference ?? jni$_.jNullReference; - return _readBufferLong( - reference.pointer, - _id_readBufferLong as jni$_.JMethodIDPtr, - _$order.pointer, - byteOffset, - ).long; - } - - static final _id_writeBufferLong = _class.instanceMethodId( - r'writeBufferLong', - r'(Ljava/nio/ByteOrder;JJ)V', - ); - - static final _writeBufferLong = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Int64, jni$_.Int64) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - int, - int, - ) - >(); - - /// from: `public void writeBufferLong(java.nio.ByteOrder order, long byteOffset, long value)` - void writeBufferLong(jni$_.JObject? order, int byteOffset, int value) { - final _$order = order?.reference ?? jni$_.jNullReference; - _writeBufferLong( - reference.pointer, - _id_writeBufferLong as jni$_.JMethodIDPtr, - _$order.pointer, - byteOffset, - value, - ).check(); - } - - static final _id_readBufferFloat = _class.instanceMethodId( - r'readBufferFloat', - r'(Ljava/nio/ByteOrder;J)F', - ); - - static final _readBufferFloat = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer, jni$_.Int64)>, - ) - > - >('globalEnv_CallFloatMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - int, - ) - >(); - - /// from: `public float readBufferFloat(java.nio.ByteOrder order, long byteOffset)` - double readBufferFloat(jni$_.JObject? order, int byteOffset) { - final _$order = order?.reference ?? jni$_.jNullReference; - return _readBufferFloat( - reference.pointer, - _id_readBufferFloat as jni$_.JMethodIDPtr, - _$order.pointer, - byteOffset, - ).float; - } - - static final _id_writeBufferFloat = _class.instanceMethodId( - r'writeBufferFloat', - r'(Ljava/nio/ByteOrder;JF)V', - ); - - static final _writeBufferFloat = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Int64, jni$_.Double) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - int, - double, - ) - >(); - - /// from: `public void writeBufferFloat(java.nio.ByteOrder order, long byteOffset, float value)` - void writeBufferFloat(jni$_.JObject? order, int byteOffset, double value) { - final _$order = order?.reference ?? jni$_.jNullReference; - _writeBufferFloat( - reference.pointer, - _id_writeBufferFloat as jni$_.JMethodIDPtr, - _$order.pointer, - byteOffset, - value, - ).check(); - } - - static final _id_readBufferDouble = _class.instanceMethodId( - r'readBufferDouble', - r'(Ljava/nio/ByteOrder;J)D', - ); - - static final _readBufferDouble = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer, jni$_.Int64)>, - ) - > - >('globalEnv_CallDoubleMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - int, - ) - >(); - - /// from: `public double readBufferDouble(java.nio.ByteOrder order, long byteOffset)` - double readBufferDouble(jni$_.JObject? order, int byteOffset) { - final _$order = order?.reference ?? jni$_.jNullReference; - return _readBufferDouble( - reference.pointer, - _id_readBufferDouble as jni$_.JMethodIDPtr, - _$order.pointer, - byteOffset, - ).doubleFloat; - } - - static final _id_writeBufferDouble = _class.instanceMethodId( - r'writeBufferDouble', - r'(Ljava/nio/ByteOrder;JD)V', - ); - - static final _writeBufferDouble = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Int64, jni$_.Double) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - int, - double, - ) - >(); - - /// from: `public void writeBufferDouble(java.nio.ByteOrder order, long byteOffset, double value)` - void writeBufferDouble(jni$_.JObject? order, int byteOffset, double value) { - final _$order = order?.reference ?? jni$_.jNullReference; - _writeBufferDouble( - reference.pointer, - _id_writeBufferDouble as jni$_.JMethodIDPtr, - _$order.pointer, - byteOffset, - value, - ).check(); - } - - static final _id_hasMembers = _class.instanceMethodId(r'hasMembers', r'()Z'); - - static final _hasMembers = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean hasMembers()` - bool hasMembers() { - return _hasMembers( - reference.pointer, - _id_hasMembers as jni$_.JMethodIDPtr, - ).boolean; - } - - static final _id_hasMember = _class.instanceMethodId( - r'hasMember', - r'(Ljava/lang/String;)Z', - ); - - static final _hasMember = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public boolean hasMember(java.lang.String identifier)` - bool hasMember(jni$_.JString? identifier) { - final _$identifier = identifier?.reference ?? jni$_.jNullReference; - return _hasMember( - reference.pointer, - _id_hasMember as jni$_.JMethodIDPtr, - _$identifier.pointer, - ).boolean; - } - - static final _id_getMember = _class.instanceMethodId( - r'getMember', - r'(Ljava/lang/String;)Lorg/graalvm/polyglot/Value;', - ); - - static final _getMember = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Value getMember(java.lang.String identifier)` - /// The returned object must be released after use, by calling the [release] method. - Value? getMember(jni$_.JString? identifier) { - final _$identifier = identifier?.reference ?? jni$_.jNullReference; - return _getMember( - reference.pointer, - _id_getMember as jni$_.JMethodIDPtr, - _$identifier.pointer, - ).object(const $Value$NullableType()); - } - - static final _id_getMemberKeys = _class.instanceMethodId( - r'getMemberKeys', - r'()Ljava/util/Set;', - ); - - static final _getMemberKeys = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public java.util.Set getMemberKeys()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JSet? getMemberKeys() { - return _getMemberKeys( - reference.pointer, - _id_getMemberKeys as jni$_.JMethodIDPtr, - ).object?>( - const jni$_.JSetNullableType(jni$_.JStringNullableType()), - ); - } - - static final _id_putMember = _class.instanceMethodId( - r'putMember', - r'(Ljava/lang/String;Ljava/lang/Object;)V', - ); - - static final _putMember = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Pointer) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public void putMember(java.lang.String identifier, java.lang.Object value)` - void putMember(jni$_.JString? identifier, jni$_.JObject? value) { - final _$identifier = identifier?.reference ?? jni$_.jNullReference; - final _$value = value?.reference ?? jni$_.jNullReference; - _putMember( - reference.pointer, - _id_putMember as jni$_.JMethodIDPtr, - _$identifier.pointer, - _$value.pointer, - ).check(); - } - - static final _id_removeMember = _class.instanceMethodId( - r'removeMember', - r'(Ljava/lang/String;)Z', - ); - - static final _removeMember = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public boolean removeMember(java.lang.String identifier)` - bool removeMember(jni$_.JString? identifier) { - final _$identifier = identifier?.reference ?? jni$_.jNullReference; - return _removeMember( - reference.pointer, - _id_removeMember as jni$_.JMethodIDPtr, - _$identifier.pointer, - ).boolean; - } - - static final _id_canExecute = _class.instanceMethodId(r'canExecute', r'()Z'); - - static final _canExecute = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean canExecute()` - bool canExecute() { - return _canExecute( - reference.pointer, - _id_canExecute as jni$_.JMethodIDPtr, - ).boolean; - } - - static final _id_execute = _class.instanceMethodId( - r'execute', - r'([Ljava/lang/Object;)Lorg/graalvm/polyglot/Value;', - ); - - static final _execute = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Value execute(java.lang.Object[] arguments)` - /// The returned object must be released after use, by calling the [release] method. - Value? execute(jni$_.JArray? arguments) { - final _$arguments = arguments?.reference ?? jni$_.jNullReference; - return _execute( - reference.pointer, - _id_execute as jni$_.JMethodIDPtr, - _$arguments.pointer, - ).object(const $Value$NullableType()); - } - - static final _id_executeVoid = _class.instanceMethodId( - r'executeVoid', - r'([Ljava/lang/Object;)V', - ); - - static final _executeVoid = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public void executeVoid(java.lang.Object[] arguments)` - void executeVoid(jni$_.JArray? arguments) { - final _$arguments = arguments?.reference ?? jni$_.jNullReference; - _executeVoid( - reference.pointer, - _id_executeVoid as jni$_.JMethodIDPtr, - _$arguments.pointer, - ).check(); - } - - static final _id_canInstantiate = _class.instanceMethodId( - r'canInstantiate', - r'()Z', - ); - - static final _canInstantiate = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean canInstantiate()` - bool canInstantiate() { - return _canInstantiate( - reference.pointer, - _id_canInstantiate as jni$_.JMethodIDPtr, - ).boolean; - } - - static final _id_newInstance = _class.instanceMethodId( - r'newInstance', - r'([Ljava/lang/Object;)Lorg/graalvm/polyglot/Value;', - ); - - static final _newInstance = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Value newInstance(java.lang.Object[] arguments)` - /// The returned object must be released after use, by calling the [release] method. - Value? newInstance(jni$_.JArray? arguments) { - final _$arguments = arguments?.reference ?? jni$_.jNullReference; - return _newInstance( - reference.pointer, - _id_newInstance as jni$_.JMethodIDPtr, - _$arguments.pointer, - ).object(const $Value$NullableType()); - } - - static final _id_canInvokeMember = _class.instanceMethodId( - r'canInvokeMember', - r'(Ljava/lang/String;)Z', - ); - - static final _canInvokeMember = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public boolean canInvokeMember(java.lang.String identifier)` - bool canInvokeMember(jni$_.JString? identifier) { - final _$identifier = identifier?.reference ?? jni$_.jNullReference; - return _canInvokeMember( - reference.pointer, - _id_canInvokeMember as jni$_.JMethodIDPtr, - _$identifier.pointer, - ).boolean; - } - - static final _id_invokeMember = _class.instanceMethodId( - r'invokeMember', - r'(Ljava/lang/String;[Ljava/lang/Object;)Lorg/graalvm/polyglot/Value;', - ); - - static final _invokeMember = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Pointer) - >, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Value invokeMember(java.lang.String identifier, java.lang.Object[] arguments)` - /// The returned object must be released after use, by calling the [release] method. - Value? invokeMember( - jni$_.JString? identifier, - jni$_.JArray? arguments, - ) { - final _$identifier = identifier?.reference ?? jni$_.jNullReference; - final _$arguments = arguments?.reference ?? jni$_.jNullReference; - return _invokeMember( - reference.pointer, - _id_invokeMember as jni$_.JMethodIDPtr, - _$identifier.pointer, - _$arguments.pointer, - ).object(const $Value$NullableType()); - } - - static final _id_isString = _class.instanceMethodId(r'isString', r'()Z'); - - static final _isString = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean isString()` - bool isString() { - return _isString( - reference.pointer, - _id_isString as jni$_.JMethodIDPtr, - ).boolean; - } - - static final _id_asString = _class.instanceMethodId( - r'asString', - r'()Ljava/lang/String;', - ); - - static final _asString = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public java.lang.String asString()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JString? asString() { - return _asString( - reference.pointer, - _id_asString as jni$_.JMethodIDPtr, - ).object(const jni$_.JStringNullableType()); - } - - static final _id_asStringBytes = _class.instanceMethodId( - r'asStringBytes', - r'(Lorg/graalvm/polyglot/Value$StringEncoding;)[B', - ); - - static final _asStringBytes = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public byte[] asStringBytes(org.graalvm.polyglot.Value$StringEncoding encoding)` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JByteArray? asStringBytes(Value$StringEncoding? encoding) { - final _$encoding = encoding?.reference ?? jni$_.jNullReference; - return _asStringBytes( - reference.pointer, - _id_asStringBytes as jni$_.JMethodIDPtr, - _$encoding.pointer, - ).object(const jni$_.JByteArrayNullableType()); - } - - static final _id_fitsInInt = _class.instanceMethodId(r'fitsInInt', r'()Z'); - - static final _fitsInInt = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean fitsInInt()` - bool fitsInInt() { - return _fitsInInt( - reference.pointer, - _id_fitsInInt as jni$_.JMethodIDPtr, - ).boolean; - } - - static final _id_asInt = _class.instanceMethodId(r'asInt', r'()I'); - - static final _asInt = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallIntMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public int asInt()` - int asInt() { - return _asInt(reference.pointer, _id_asInt as jni$_.JMethodIDPtr).integer; - } - - static final _id_isBoolean = _class.instanceMethodId(r'isBoolean', r'()Z'); - - static final _isBoolean = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean isBoolean()` - bool isBoolean() { - return _isBoolean( - reference.pointer, - _id_isBoolean as jni$_.JMethodIDPtr, - ).boolean; - } - - static final _id_asBoolean = _class.instanceMethodId(r'asBoolean', r'()Z'); - - static final _asBoolean = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean asBoolean()` - bool asBoolean() { - return _asBoolean( - reference.pointer, - _id_asBoolean as jni$_.JMethodIDPtr, - ).boolean; - } - - static final _id_isNumber = _class.instanceMethodId(r'isNumber', r'()Z'); - - static final _isNumber = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean isNumber()` - bool isNumber() { - return _isNumber( - reference.pointer, - _id_isNumber as jni$_.JMethodIDPtr, - ).boolean; - } - - static final _id_fitsInLong = _class.instanceMethodId(r'fitsInLong', r'()Z'); - - static final _fitsInLong = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean fitsInLong()` - bool fitsInLong() { - return _fitsInLong( - reference.pointer, - _id_fitsInLong as jni$_.JMethodIDPtr, - ).boolean; - } - - static final _id_asLong = _class.instanceMethodId(r'asLong', r'()J'); - - static final _asLong = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallLongMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public long asLong()` - int asLong() { - return _asLong(reference.pointer, _id_asLong as jni$_.JMethodIDPtr).long; - } - - static final _id_fitsInBigInteger = _class.instanceMethodId( - r'fitsInBigInteger', - r'()Z', - ); - - static final _fitsInBigInteger = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean fitsInBigInteger()` - bool fitsInBigInteger() { - return _fitsInBigInteger( - reference.pointer, - _id_fitsInBigInteger as jni$_.JMethodIDPtr, - ).boolean; - } - - static final _id_asBigInteger = _class.instanceMethodId( - r'asBigInteger', - r'()Ljava/math/BigInteger;', - ); - - static final _asBigInteger = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public java.math.BigInteger asBigInteger()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? asBigInteger() { - return _asBigInteger( - reference.pointer, - _id_asBigInteger as jni$_.JMethodIDPtr, - ).object(const jni$_.JObjectNullableType()); - } - - static final _id_fitsInDouble = _class.instanceMethodId( - r'fitsInDouble', - r'()Z', - ); - - static final _fitsInDouble = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean fitsInDouble()` - bool fitsInDouble() { - return _fitsInDouble( - reference.pointer, - _id_fitsInDouble as jni$_.JMethodIDPtr, - ).boolean; - } - - static final _id_asDouble = _class.instanceMethodId(r'asDouble', r'()D'); - - static final _asDouble = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallDoubleMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public double asDouble()` - double asDouble() { - return _asDouble( - reference.pointer, - _id_asDouble as jni$_.JMethodIDPtr, - ).doubleFloat; - } - - static final _id_fitsInFloat = _class.instanceMethodId( - r'fitsInFloat', - r'()Z', - ); - - static final _fitsInFloat = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean fitsInFloat()` - bool fitsInFloat() { - return _fitsInFloat( - reference.pointer, - _id_fitsInFloat as jni$_.JMethodIDPtr, - ).boolean; - } - - static final _id_asFloat = _class.instanceMethodId(r'asFloat', r'()F'); - - static final _asFloat = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallFloatMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public float asFloat()` - double asFloat() { - return _asFloat(reference.pointer, _id_asFloat as jni$_.JMethodIDPtr).float; - } - - static final _id_fitsInByte = _class.instanceMethodId(r'fitsInByte', r'()Z'); - - static final _fitsInByte = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean fitsInByte()` - bool fitsInByte() { - return _fitsInByte( - reference.pointer, - _id_fitsInByte as jni$_.JMethodIDPtr, - ).boolean; - } - - static final _id_asByte = _class.instanceMethodId(r'asByte', r'()B'); - - static final _asByte = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallByteMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public byte asByte()` - int asByte() { - return _asByte(reference.pointer, _id_asByte as jni$_.JMethodIDPtr).byte; - } - - static final _id_fitsInShort = _class.instanceMethodId( - r'fitsInShort', - r'()Z', - ); - - static final _fitsInShort = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean fitsInShort()` - bool fitsInShort() { - return _fitsInShort( - reference.pointer, - _id_fitsInShort as jni$_.JMethodIDPtr, - ).boolean; - } - - static final _id_asShort = _class.instanceMethodId(r'asShort', r'()S'); - - static final _asShort = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallShortMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public short asShort()` - int asShort() { - return _asShort(reference.pointer, _id_asShort as jni$_.JMethodIDPtr).short; - } - - static final _id_isNull$1 = _class.instanceMethodId(r'isNull', r'()Z'); - - static final _isNull$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean isNull()` - bool isNull$1() { - return _isNull$1( - reference.pointer, - _id_isNull$1 as jni$_.JMethodIDPtr, - ).boolean; - } - - static final _id_isNativePointer = _class.instanceMethodId( - r'isNativePointer', - r'()Z', - ); - - static final _isNativePointer = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean isNativePointer()` - bool isNativePointer() { - return _isNativePointer( - reference.pointer, - _id_isNativePointer as jni$_.JMethodIDPtr, - ).boolean; - } - - static final _id_asNativePointer = _class.instanceMethodId( - r'asNativePointer', - r'()J', - ); - - static final _asNativePointer = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallLongMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public long asNativePointer()` - int asNativePointer() { - return _asNativePointer( - reference.pointer, - _id_asNativePointer as jni$_.JMethodIDPtr, - ).long; - } - - static final _id_isHostObject = _class.instanceMethodId( - r'isHostObject', - r'()Z', - ); - - static final _isHostObject = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean isHostObject()` - bool isHostObject() { - return _isHostObject( - reference.pointer, - _id_isHostObject as jni$_.JMethodIDPtr, - ).boolean; - } - - static final _id_asHostObject = _class.instanceMethodId( - r'asHostObject', - r'()Ljava/lang/Object;', - ); - - static final _asHostObject = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public T asHostObject()` - /// The returned object must be released after use, by calling the [release] method. - $T? asHostObject<$T extends jni$_.JObject?>({required jni$_.JObjType<$T> T}) { - return _asHostObject( - reference.pointer, - _id_asHostObject as jni$_.JMethodIDPtr, - ).object<$T?>(T.nullableType); - } - - static final _id_isProxyObject = _class.instanceMethodId( - r'isProxyObject', - r'()Z', - ); - - static final _isProxyObject = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean isProxyObject()` - bool isProxyObject() { - return _isProxyObject( - reference.pointer, - _id_isProxyObject as jni$_.JMethodIDPtr, - ).boolean; - } - - static final _id_asProxyObject = _class.instanceMethodId( - r'asProxyObject', - r'()Lorg/graalvm/polyglot/proxy/Proxy;', - ); - - static final _asProxyObject = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public T asProxyObject()` - /// The returned object must be released after use, by calling the [release] method. - $T? asProxyObject<$T extends jni$_.JObject?>({ - required jni$_.JObjType<$T> T, - }) { - return _asProxyObject( - reference.pointer, - _id_asProxyObject as jni$_.JMethodIDPtr, - ).object<$T?>(T.nullableType); - } - - static final _id_as$1 = _class.instanceMethodId( - r'as', - r'(Ljava/lang/Class;)Ljava/lang/Object;', - ); - - static final _as$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public T as(java.lang.Class targetType)` - /// The returned object must be released after use, by calling the [release] method. - $T? as$1<$T extends jni$_.JObject?>( - jni$_.JObject? targetType, { - required jni$_.JObjType<$T> T, - }) { - final _$targetType = targetType?.reference ?? jni$_.jNullReference; - return _as$1( - reference.pointer, - _id_as$1 as jni$_.JMethodIDPtr, - _$targetType.pointer, - ).object<$T?>(T.nullableType); - } - - static final _id_as$2 = _class.instanceMethodId( - r'as', - r'(Lorg/graalvm/polyglot/TypeLiteral;)Ljava/lang/Object;', - ); - - static final _as$2 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public T as(org.graalvm.polyglot.TypeLiteral targetType)` - /// The returned object must be released after use, by calling the [release] method. - $T? as$2<$T extends jni$_.JObject?>( - jni$_.JObject? targetType, { - required jni$_.JObjType<$T> T, - }) { - final _$targetType = targetType?.reference ?? jni$_.jNullReference; - return _as$2( - reference.pointer, - _id_as$2 as jni$_.JMethodIDPtr, - _$targetType.pointer, - ).object<$T?>(T.nullableType); - } - - static final _id_toString$1 = _class.instanceMethodId( - r'toString', - r'()Ljava/lang/String;', - ); - - static final _toString$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public java.lang.String toString()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JString? toString$1() { - return _toString$1( - reference.pointer, - _id_toString$1 as jni$_.JMethodIDPtr, - ).object(const jni$_.JStringNullableType()); - } - - static final _id_getSourceLocation = _class.instanceMethodId( - r'getSourceLocation', - r'()Lorg/graalvm/polyglot/SourceSection;', - ); - - static final _getSourceLocation = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public org.graalvm.polyglot.SourceSection getSourceLocation()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? getSourceLocation() { - return _getSourceLocation( - reference.pointer, - _id_getSourceLocation as jni$_.JMethodIDPtr, - ).object(const jni$_.JObjectNullableType()); - } - - static final _id_isDate = _class.instanceMethodId(r'isDate', r'()Z'); - - static final _isDate = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean isDate()` - bool isDate() { - return _isDate(reference.pointer, _id_isDate as jni$_.JMethodIDPtr).boolean; - } - - static final _id_asDate = _class.instanceMethodId( - r'asDate', - r'()Ljava/time/LocalDate;', - ); - - static final _asDate = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public java.time.LocalDate asDate()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? asDate() { - return _asDate( - reference.pointer, - _id_asDate as jni$_.JMethodIDPtr, - ).object(const jni$_.JObjectNullableType()); - } - - static final _id_isTime = _class.instanceMethodId(r'isTime', r'()Z'); - - static final _isTime = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean isTime()` - bool isTime() { - return _isTime(reference.pointer, _id_isTime as jni$_.JMethodIDPtr).boolean; - } - - static final _id_asTime = _class.instanceMethodId( - r'asTime', - r'()Ljava/time/LocalTime;', - ); - - static final _asTime = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public java.time.LocalTime asTime()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? asTime() { - return _asTime( - reference.pointer, - _id_asTime as jni$_.JMethodIDPtr, - ).object(const jni$_.JObjectNullableType()); - } - - static final _id_isInstant = _class.instanceMethodId(r'isInstant', r'()Z'); - - static final _isInstant = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean isInstant()` - bool isInstant() { - return _isInstant( - reference.pointer, - _id_isInstant as jni$_.JMethodIDPtr, - ).boolean; - } - - static final _id_asInstant = _class.instanceMethodId( - r'asInstant', - r'()Ljava/time/Instant;', - ); - - static final _asInstant = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public java.time.Instant asInstant()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? asInstant() { - return _asInstant( - reference.pointer, - _id_asInstant as jni$_.JMethodIDPtr, - ).object(const jni$_.JObjectNullableType()); - } - - static final _id_isTimeZone = _class.instanceMethodId(r'isTimeZone', r'()Z'); - - static final _isTimeZone = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean isTimeZone()` - bool isTimeZone() { - return _isTimeZone( - reference.pointer, - _id_isTimeZone as jni$_.JMethodIDPtr, - ).boolean; - } - - static final _id_asTimeZone = _class.instanceMethodId( - r'asTimeZone', - r'()Ljava/time/ZoneId;', - ); - - static final _asTimeZone = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public java.time.ZoneId asTimeZone()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? asTimeZone() { - return _asTimeZone( - reference.pointer, - _id_asTimeZone as jni$_.JMethodIDPtr, - ).object(const jni$_.JObjectNullableType()); - } - - static final _id_isDuration = _class.instanceMethodId(r'isDuration', r'()Z'); - - static final _isDuration = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean isDuration()` - bool isDuration() { - return _isDuration( - reference.pointer, - _id_isDuration as jni$_.JMethodIDPtr, - ).boolean; - } - - static final _id_asDuration = _class.instanceMethodId( - r'asDuration', - r'()Ljava/time/Duration;', - ); - - static final _asDuration = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public java.time.Duration asDuration()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? asDuration() { - return _asDuration( - reference.pointer, - _id_asDuration as jni$_.JMethodIDPtr, - ).object(const jni$_.JObjectNullableType()); - } - - static final _id_isException = _class.instanceMethodId( - r'isException', - r'()Z', - ); - - static final _isException = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean isException()` - bool isException() { - return _isException( - reference.pointer, - _id_isException as jni$_.JMethodIDPtr, - ).boolean; - } - - static final _id_throwException = _class.instanceMethodId( - r'throwException', - r'()Ljava/lang/RuntimeException;', - ); - - static final _throwException = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public java.lang.RuntimeException throwException()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? throwException() { - return _throwException( - reference.pointer, - _id_throwException as jni$_.JMethodIDPtr, - ).object(const jni$_.JObjectNullableType()); - } - - static final _id_getContext = _class.instanceMethodId( - r'getContext', - r'()Lorg/graalvm/polyglot/Context;', - ); - - static final _getContext = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public org.graalvm.polyglot.Context getContext()` - /// The returned object must be released after use, by calling the [release] method. - context$_.Context? getContext() { - return _getContext( - reference.pointer, - _id_getContext as jni$_.JMethodIDPtr, - ).object(const context$_.$Context$NullableType()); - } - - static final _id_equals = _class.instanceMethodId( - r'equals', - r'(Ljava/lang/Object;)Z', - ); - - static final _equals = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public boolean equals(java.lang.Object obj)` - bool equals(jni$_.JObject? obj) { - final _$obj = obj?.reference ?? jni$_.jNullReference; - return _equals( - reference.pointer, - _id_equals as jni$_.JMethodIDPtr, - _$obj.pointer, - ).boolean; - } - - static final _id_hashCode$1 = _class.instanceMethodId(r'hashCode', r'()I'); - - static final _hashCode$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallIntMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public int hashCode()` - int hashCode$1() { - return _hashCode$1( - reference.pointer, - _id_hashCode$1 as jni$_.JMethodIDPtr, - ).integer; - } - - static final _id_hasIterator = _class.instanceMethodId( - r'hasIterator', - r'()Z', - ); - - static final _hasIterator = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean hasIterator()` - bool hasIterator() { - return _hasIterator( - reference.pointer, - _id_hasIterator as jni$_.JMethodIDPtr, - ).boolean; - } - - static final _id_getIterator = _class.instanceMethodId( - r'getIterator', - r'()Lorg/graalvm/polyglot/Value;', - ); - - static final _getIterator = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public org.graalvm.polyglot.Value getIterator()` - /// The returned object must be released after use, by calling the [release] method. - Value? getIterator() { - return _getIterator( - reference.pointer, - _id_getIterator as jni$_.JMethodIDPtr, - ).object(const $Value$NullableType()); - } - - static final _id_isIterator = _class.instanceMethodId(r'isIterator', r'()Z'); - - static final _isIterator = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean isIterator()` - bool isIterator() { - return _isIterator( - reference.pointer, - _id_isIterator as jni$_.JMethodIDPtr, - ).boolean; - } - - static final _id_hasIteratorNextElement = _class.instanceMethodId( - r'hasIteratorNextElement', - r'()Z', - ); - - static final _hasIteratorNextElement = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean hasIteratorNextElement()` - bool hasIteratorNextElement() { - return _hasIteratorNextElement( - reference.pointer, - _id_hasIteratorNextElement as jni$_.JMethodIDPtr, - ).boolean; - } - - static final _id_getIteratorNextElement = _class.instanceMethodId( - r'getIteratorNextElement', - r'()Lorg/graalvm/polyglot/Value;', - ); - - static final _getIteratorNextElement = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public org.graalvm.polyglot.Value getIteratorNextElement()` - /// The returned object must be released after use, by calling the [release] method. - Value? getIteratorNextElement() { - return _getIteratorNextElement( - reference.pointer, - _id_getIteratorNextElement as jni$_.JMethodIDPtr, - ).object(const $Value$NullableType()); - } - - static final _id_hasHashEntries = _class.instanceMethodId( - r'hasHashEntries', - r'()Z', - ); - - static final _hasHashEntries = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean hasHashEntries()` - bool hasHashEntries() { - return _hasHashEntries( - reference.pointer, - _id_hasHashEntries as jni$_.JMethodIDPtr, - ).boolean; - } - - static final _id_getHashSize = _class.instanceMethodId( - r'getHashSize', - r'()J', - ); - - static final _getHashSize = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallLongMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public long getHashSize()` - int getHashSize() { - return _getHashSize( - reference.pointer, - _id_getHashSize as jni$_.JMethodIDPtr, - ).long; - } - - static final _id_hasHashEntry = _class.instanceMethodId( - r'hasHashEntry', - r'(Ljava/lang/Object;)Z', - ); - - static final _hasHashEntry = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public boolean hasHashEntry(java.lang.Object key)` - bool hasHashEntry(jni$_.JObject? key) { - final _$key = key?.reference ?? jni$_.jNullReference; - return _hasHashEntry( - reference.pointer, - _id_hasHashEntry as jni$_.JMethodIDPtr, - _$key.pointer, - ).boolean; - } - - static final _id_getHashValue = _class.instanceMethodId( - r'getHashValue', - r'(Ljava/lang/Object;)Lorg/graalvm/polyglot/Value;', - ); - - static final _getHashValue = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Value getHashValue(java.lang.Object key)` - /// The returned object must be released after use, by calling the [release] method. - Value? getHashValue(jni$_.JObject? key) { - final _$key = key?.reference ?? jni$_.jNullReference; - return _getHashValue( - reference.pointer, - _id_getHashValue as jni$_.JMethodIDPtr, - _$key.pointer, - ).object(const $Value$NullableType()); - } - - static final _id_getHashValueOrDefault = _class.instanceMethodId( - r'getHashValueOrDefault', - r'(Ljava/lang/Object;Ljava/lang/Object;)Lorg/graalvm/polyglot/Value;', - ); - - static final _getHashValueOrDefault = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Pointer) - >, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public org.graalvm.polyglot.Value getHashValueOrDefault(java.lang.Object key, java.lang.Object defaultValue)` - /// The returned object must be released after use, by calling the [release] method. - Value? getHashValueOrDefault( - jni$_.JObject? key, - jni$_.JObject? defaultValue, - ) { - final _$key = key?.reference ?? jni$_.jNullReference; - final _$defaultValue = defaultValue?.reference ?? jni$_.jNullReference; - return _getHashValueOrDefault( - reference.pointer, - _id_getHashValueOrDefault as jni$_.JMethodIDPtr, - _$key.pointer, - _$defaultValue.pointer, - ).object(const $Value$NullableType()); - } - - static final _id_putHashEntry = _class.instanceMethodId( - r'putHashEntry', - r'(Ljava/lang/Object;Ljava/lang/Object;)V', - ); - - static final _putHashEntry = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Pointer) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public void putHashEntry(java.lang.Object key, java.lang.Object value)` - void putHashEntry(jni$_.JObject? key, jni$_.JObject? value) { - final _$key = key?.reference ?? jni$_.jNullReference; - final _$value = value?.reference ?? jni$_.jNullReference; - _putHashEntry( - reference.pointer, - _id_putHashEntry as jni$_.JMethodIDPtr, - _$key.pointer, - _$value.pointer, - ).check(); - } - - static final _id_removeHashEntry = _class.instanceMethodId( - r'removeHashEntry', - r'(Ljava/lang/Object;)Z', - ); - - static final _removeHashEntry = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public boolean removeHashEntry(java.lang.Object key)` - bool removeHashEntry(jni$_.JObject? key) { - final _$key = key?.reference ?? jni$_.jNullReference; - return _removeHashEntry( - reference.pointer, - _id_removeHashEntry as jni$_.JMethodIDPtr, - _$key.pointer, - ).boolean; - } - - static final _id_getHashEntriesIterator = _class.instanceMethodId( - r'getHashEntriesIterator', - r'()Lorg/graalvm/polyglot/Value;', - ); - - static final _getHashEntriesIterator = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public org.graalvm.polyglot.Value getHashEntriesIterator()` - /// The returned object must be released after use, by calling the [release] method. - Value? getHashEntriesIterator() { - return _getHashEntriesIterator( - reference.pointer, - _id_getHashEntriesIterator as jni$_.JMethodIDPtr, - ).object(const $Value$NullableType()); - } - - static final _id_getHashKeysIterator = _class.instanceMethodId( - r'getHashKeysIterator', - r'()Lorg/graalvm/polyglot/Value;', - ); - - static final _getHashKeysIterator = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public org.graalvm.polyglot.Value getHashKeysIterator()` - /// The returned object must be released after use, by calling the [release] method. - Value? getHashKeysIterator() { - return _getHashKeysIterator( - reference.pointer, - _id_getHashKeysIterator as jni$_.JMethodIDPtr, - ).object(const $Value$NullableType()); - } - - static final _id_getHashValuesIterator = _class.instanceMethodId( - r'getHashValuesIterator', - r'()Lorg/graalvm/polyglot/Value;', - ); - - static final _getHashValuesIterator = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public org.graalvm.polyglot.Value getHashValuesIterator()` - /// The returned object must be released after use, by calling the [release] method. - Value? getHashValuesIterator() { - return _getHashValuesIterator( - reference.pointer, - _id_getHashValuesIterator as jni$_.JMethodIDPtr, - ).object(const $Value$NullableType()); - } - - static final _id_asValue = _class.staticMethodId( - r'asValue', - r'(Ljava/lang/Object;)Lorg/graalvm/polyglot/Value;', - ); - - static final _asValue = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallStaticObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `static public org.graalvm.polyglot.Value asValue(java.lang.Object o)` - /// The returned object must be released after use, by calling the [release] method. - static Value? asValue(jni$_.JObject? o) { - final _$o = o?.reference ?? jni$_.jNullReference; - return _asValue( - _class.reference.pointer, - _id_asValue as jni$_.JMethodIDPtr, - _$o.pointer, - ).object(const $Value$NullableType()); - } - - static final _id_pin = _class.instanceMethodId(r'pin', r'()V'); - - static final _pin = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public void pin()` - void pin() { - _pin(reference.pointer, _id_pin as jni$_.JMethodIDPtr).check(); - } - - static final _id_fromByteBasedString = _class.staticMethodId( - r'fromByteBasedString', - r'([BLorg/graalvm/polyglot/Value$StringEncoding;)Lorg/graalvm/polyglot/Value;', - ); - - static final _fromByteBasedString = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Pointer) - >, - ) - > - >('globalEnv_CallStaticObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `static public org.graalvm.polyglot.Value fromByteBasedString(byte[] bytes, org.graalvm.polyglot.Value$StringEncoding encoding)` - /// The returned object must be released after use, by calling the [release] method. - static Value? fromByteBasedString( - jni$_.JByteArray? bytes, - Value$StringEncoding? encoding, - ) { - final _$bytes = bytes?.reference ?? jni$_.jNullReference; - final _$encoding = encoding?.reference ?? jni$_.jNullReference; - return _fromByteBasedString( - _class.reference.pointer, - _id_fromByteBasedString as jni$_.JMethodIDPtr, - _$bytes.pointer, - _$encoding.pointer, - ).object(const $Value$NullableType()); - } - - static final _id_fromByteBasedString$1 = _class.staticMethodId( - r'fromByteBasedString', - r'([BIILorg/graalvm/polyglot/Value$StringEncoding;Z)Lorg/graalvm/polyglot/Value;', - ); - - static final _fromByteBasedString$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Int32, - jni$_.Int32, - jni$_.Pointer, - jni$_.Int32, - ) - >, - ) - > - >('globalEnv_CallStaticObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - int, - int, - jni$_.Pointer, - int, - ) - >(); - - /// from: `static public org.graalvm.polyglot.Value fromByteBasedString(byte[] bytes, int offset, int length, org.graalvm.polyglot.Value$StringEncoding encoding, boolean copy)` - /// The returned object must be released after use, by calling the [release] method. - static Value? fromByteBasedString$1( - jni$_.JByteArray? bytes, - int offset, - int length, - Value$StringEncoding? encoding, - bool copy, - ) { - final _$bytes = bytes?.reference ?? jni$_.jNullReference; - final _$encoding = encoding?.reference ?? jni$_.jNullReference; - return _fromByteBasedString$1( - _class.reference.pointer, - _id_fromByteBasedString$1 as jni$_.JMethodIDPtr, - _$bytes.pointer, - offset, - length, - _$encoding.pointer, - copy ? 1 : 0, - ).object(const $Value$NullableType()); - } - - static final _id_fromNativeString = _class.staticMethodId( - r'fromNativeString', - r'(JIILorg/graalvm/polyglot/Value$StringEncoding;Z)Lorg/graalvm/polyglot/Value;', - ); - - static final _fromNativeString = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Int64, - jni$_.Int32, - jni$_.Int32, - jni$_.Pointer, - jni$_.Int32, - ) - >, - ) - > - >('globalEnv_CallStaticObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - int, - int, - int, - jni$_.Pointer, - int, - ) - >(); - - /// from: `static public org.graalvm.polyglot.Value fromNativeString(long basePointer, int byteOffset, int byteLength, org.graalvm.polyglot.Value$StringEncoding encoding, boolean copy)` - /// The returned object must be released after use, by calling the [release] method. - static Value? fromNativeString( - int basePointer, - int byteOffset, - int byteLength, - Value$StringEncoding? encoding, - bool copy, - ) { - final _$encoding = encoding?.reference ?? jni$_.jNullReference; - return _fromNativeString( - _class.reference.pointer, - _id_fromNativeString as jni$_.JMethodIDPtr, - basePointer, - byteOffset, - byteLength, - _$encoding.pointer, - copy ? 1 : 0, - ).object(const $Value$NullableType()); - } - - static final _id_fromNativeString$1 = _class.staticMethodId( - r'fromNativeString', - r'(JILorg/graalvm/polyglot/Value$StringEncoding;)Lorg/graalvm/polyglot/Value;', - ); - - static final _fromNativeString$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Int64, jni$_.Int32, jni$_.Pointer) - >, - ) - > - >('globalEnv_CallStaticObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - int, - int, - jni$_.Pointer, - ) - >(); - - /// from: `static public org.graalvm.polyglot.Value fromNativeString(long basePointer, int byteLength, org.graalvm.polyglot.Value$StringEncoding encoding)` - /// The returned object must be released after use, by calling the [release] method. - static Value? fromNativeString$1( - int basePointer, - int byteLength, - Value$StringEncoding? encoding, - ) { - final _$encoding = encoding?.reference ?? jni$_.jNullReference; - return _fromNativeString$1( - _class.reference.pointer, - _id_fromNativeString$1 as jni$_.JMethodIDPtr, - basePointer, - byteLength, - _$encoding.pointer, - ).object(const $Value$NullableType()); - } -} - -final class $Value$NullableType extends jni$_.JObjType { - @jni$_.internal - const $Value$NullableType(); - - @jni$_.internal - @core$_.override - String get signature => r'Lorg/graalvm/polyglot/Value;'; - - @jni$_.internal - @core$_.override - Value? fromReference(jni$_.JReference reference) => - reference.isNull ? null : Value.fromReference(reference); - @jni$_.internal - @core$_.override - jni$_.JObjType get superType => const jni$_.JObjectNullableType(); - - @jni$_.internal - @core$_.override - jni$_.JObjType get nullableType => this; - - @jni$_.internal - @core$_.override - final superCount = 1; - - @core$_.override - int get hashCode => ($Value$NullableType).hashCode; - - @core$_.override - bool operator ==(Object other) { - return other.runtimeType == ($Value$NullableType) && - other is $Value$NullableType; - } -} - -final class $Value$Type extends jni$_.JObjType { - @jni$_.internal - const $Value$Type(); - - @jni$_.internal - @core$_.override - String get signature => r'Lorg/graalvm/polyglot/Value;'; - - @jni$_.internal - @core$_.override - Value fromReference(jni$_.JReference reference) => - Value.fromReference(reference); - @jni$_.internal - @core$_.override - jni$_.JObjType get superType => const jni$_.JObjectNullableType(); - - @jni$_.internal - @core$_.override - jni$_.JObjType get nullableType => const $Value$NullableType(); - - @jni$_.internal - @core$_.override - final superCount = 1; - - @core$_.override - int get hashCode => ($Value$Type).hashCode; - - @core$_.override - bool operator ==(Object other) { - return other.runtimeType == ($Value$Type) && other is $Value$Type; - } -} diff --git a/graalvm_test/lib/graal/org/graalvm/polyglot/_package.dart b/graalvm_test/lib/graal/org/graalvm/polyglot/_package.dart deleted file mode 100644 index 394c32b..0000000 --- a/graalvm_test/lib/graal/org/graalvm/polyglot/_package.dart +++ /dev/null @@ -1,3 +0,0 @@ -// AUTO GENERATED BY JNIGEN 0.14.2. DO NOT EDIT! -export 'Context.dart'; -export 'Value.dart'; From f9fb854a0fe2a4c6c3e0945452a2c5018a454f24 Mon Sep 17 00:00:00 2001 From: James Williams <66931+jwill@users.noreply.github.com> Date: Tue, 9 Sep 2025 20:36:49 -0700 Subject: [PATCH 3/3] rename dir to include native_interop ignore build files --- .gitignore | 1 + {graalvm_test => graalvm_test_native_interop}/.gitignore | 0 {graalvm_test => graalvm_test_native_interop}/README.md | 0 .../analysis_options.yaml | 0 .../bin/graalvm_test.dart | 0 {graalvm_test => graalvm_test_native_interop}/jnigen.yaml | 0 .../lib/graalvm_test.dart | 0 {graalvm_test => graalvm_test_native_interop}/pubspec.yaml | 0 8 files changed, 1 insertion(+) rename {graalvm_test => graalvm_test_native_interop}/.gitignore (100%) rename {graalvm_test => graalvm_test_native_interop}/README.md (100%) rename {graalvm_test => graalvm_test_native_interop}/analysis_options.yaml (100%) rename {graalvm_test => graalvm_test_native_interop}/bin/graalvm_test.dart (100%) rename {graalvm_test => graalvm_test_native_interop}/jnigen.yaml (100%) rename {graalvm_test => graalvm_test_native_interop}/lib/graalvm_test.dart (100%) rename {graalvm_test => graalvm_test_native_interop}/pubspec.yaml (100%) diff --git a/.gitignore b/.gitignore index ecadb3f..f9e186c 100644 --- a/.gitignore +++ b/.gitignore @@ -83,3 +83,4 @@ yarn.lock !**/ios/**/default.perspectivev3 !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages /graalvm_test/build +/graalvm_test_native_interop/build diff --git a/graalvm_test/.gitignore b/graalvm_test_native_interop/.gitignore similarity index 100% rename from graalvm_test/.gitignore rename to graalvm_test_native_interop/.gitignore diff --git a/graalvm_test/README.md b/graalvm_test_native_interop/README.md similarity index 100% rename from graalvm_test/README.md rename to graalvm_test_native_interop/README.md diff --git a/graalvm_test/analysis_options.yaml b/graalvm_test_native_interop/analysis_options.yaml similarity index 100% rename from graalvm_test/analysis_options.yaml rename to graalvm_test_native_interop/analysis_options.yaml diff --git a/graalvm_test/bin/graalvm_test.dart b/graalvm_test_native_interop/bin/graalvm_test.dart similarity index 100% rename from graalvm_test/bin/graalvm_test.dart rename to graalvm_test_native_interop/bin/graalvm_test.dart diff --git a/graalvm_test/jnigen.yaml b/graalvm_test_native_interop/jnigen.yaml similarity index 100% rename from graalvm_test/jnigen.yaml rename to graalvm_test_native_interop/jnigen.yaml diff --git a/graalvm_test/lib/graalvm_test.dart b/graalvm_test_native_interop/lib/graalvm_test.dart similarity index 100% rename from graalvm_test/lib/graalvm_test.dart rename to graalvm_test_native_interop/lib/graalvm_test.dart diff --git a/graalvm_test/pubspec.yaml b/graalvm_test_native_interop/pubspec.yaml similarity index 100% rename from graalvm_test/pubspec.yaml rename to graalvm_test_native_interop/pubspec.yaml