jni-android-sys 0.0.10

Autogenerated glue code for access Android JVM APIs from Rust
// WARNING:  This file was autogenerated by jni-bindgen.  Any changes to this file may be lost!!!


#[cfg(any(feature = "all", feature = "java-util-concurrent-ThreadLocalRandom"))]
__jni_bindgen! {
    /// public class [ThreadLocalRandom](https://developer.android.com/reference/java/util/concurrent/ThreadLocalRandom.html)
    ///
    /// Required feature: "java-util-concurrent-ThreadLocalRandom"
    public class ThreadLocalRandom ("java/util/concurrent/ThreadLocalRandom") extends crate::java::util::Random {

        /// [current](https://developer.android.com/reference/java/util/concurrent/ThreadLocalRandom.html#current())
        ///
        /// Required features: "java-util-concurrent-ThreadLocalRandom"
        #[cfg(any(feature = "all", all(feature = "java-util-concurrent-ThreadLocalRandom")))]
        pub fn current<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::util::concurrent::ThreadLocalRandom>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/util/concurrent/ThreadLocalRandom", java.flags == PUBLIC | STATIC, .name == "current", .descriptor == "()Ljava/util/concurrent/ThreadLocalRandom;"
            unsafe {
                let __jni_args = [];
                let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/concurrent/ThreadLocalRandom\0", "current\0", "()Ljava/util/concurrent/ThreadLocalRandom;\0");
                __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [setSeed](https://developer.android.com/reference/java/util/concurrent/ThreadLocalRandom.html#setSeed(long))
        pub fn setSeed<'env>(&'env self, arg0: i64) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/util/concurrent/ThreadLocalRandom", java.flags == PUBLIC, .name == "setSeed", .descriptor == "(J)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/concurrent/ThreadLocalRandom\0", "setSeed\0", "(J)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [nextInt](https://developer.android.com/reference/java/util/concurrent/ThreadLocalRandom.html#nextInt(int,%20int))
        pub fn nextInt<'env>(&'env self, arg0: i32, arg1: i32) -> __jni_bindgen::std::result::Result<i32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/util/concurrent/ThreadLocalRandom", java.flags == PUBLIC, .name == "nextInt", .descriptor == "(II)I"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0), __jni_bindgen::AsJValue::as_jvalue(&arg1)];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/concurrent/ThreadLocalRandom\0", "nextInt\0", "(II)I\0");
                __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [nextLong](https://developer.android.com/reference/java/util/concurrent/ThreadLocalRandom.html#nextLong(long))
        pub fn nextLong_long<'env>(&'env self, arg0: i64) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/util/concurrent/ThreadLocalRandom", java.flags == PUBLIC, .name == "nextLong", .descriptor == "(J)J"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/concurrent/ThreadLocalRandom\0", "nextLong\0", "(J)J\0");
                __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [nextLong](https://developer.android.com/reference/java/util/concurrent/ThreadLocalRandom.html#nextLong(long,%20long))
        pub fn nextLong_long_long<'env>(&'env self, arg0: i64, arg1: i64) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/util/concurrent/ThreadLocalRandom", java.flags == PUBLIC, .name == "nextLong", .descriptor == "(JJ)J"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0), __jni_bindgen::AsJValue::as_jvalue(&arg1)];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/concurrent/ThreadLocalRandom\0", "nextLong\0", "(JJ)J\0");
                __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [nextDouble](https://developer.android.com/reference/java/util/concurrent/ThreadLocalRandom.html#nextDouble(double))
        pub fn nextDouble_double<'env>(&'env self, arg0: f64) -> __jni_bindgen::std::result::Result<f64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/util/concurrent/ThreadLocalRandom", java.flags == PUBLIC, .name == "nextDouble", .descriptor == "(D)D"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/concurrent/ThreadLocalRandom\0", "nextDouble\0", "(D)D\0");
                __jni_env.call_double_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [nextDouble](https://developer.android.com/reference/java/util/concurrent/ThreadLocalRandom.html#nextDouble(double,%20double))
        pub fn nextDouble_double_double<'env>(&'env self, arg0: f64, arg1: f64) -> __jni_bindgen::std::result::Result<f64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/util/concurrent/ThreadLocalRandom", java.flags == PUBLIC, .name == "nextDouble", .descriptor == "(DD)D"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0), __jni_bindgen::AsJValue::as_jvalue(&arg1)];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/concurrent/ThreadLocalRandom\0", "nextDouble\0", "(DD)D\0");
                __jni_env.call_double_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }
    }
}