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-TimeUnit"))]
__jni_bindgen! {
    /// public enum [TimeUnit](https://developer.android.com/reference/java/util/concurrent/TimeUnit.html)
    ///
    /// Required feature: "java-util-concurrent-TimeUnit"
    public enum TimeUnit ("java/util/concurrent/TimeUnit") extends crate::java::lang::Enum {

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

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

        /// [convert](https://developer.android.com/reference/java/util/concurrent/TimeUnit.html#convert(long,%20java.util.concurrent.TimeUnit))
        ///
        /// Required features: "java-util-concurrent-TimeUnit"
        #[cfg(any(feature = "all", all(feature = "java-util-concurrent-TimeUnit")))]
        pub fn convert<'env>(&'env self, arg0: i64, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::util::concurrent::TimeUnit>>) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/util/concurrent/TimeUnit", java.flags == PUBLIC, .name == "convert", .descriptor == "(JLjava/util/concurrent/TimeUnit;)J"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0), __jni_bindgen::AsJValue::as_jvalue(&arg1.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/concurrent/TimeUnit\0", "convert\0", "(JLjava/util/concurrent/TimeUnit;)J\0");
                __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [toNanos](https://developer.android.com/reference/java/util/concurrent/TimeUnit.html#toNanos(long))
        pub fn toNanos<'env>(&'env self, arg0: i64) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/util/concurrent/TimeUnit", java.flags == PUBLIC, .name == "toNanos", .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/TimeUnit\0", "toNanos\0", "(J)J\0");
                __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [toMicros](https://developer.android.com/reference/java/util/concurrent/TimeUnit.html#toMicros(long))
        pub fn toMicros<'env>(&'env self, arg0: i64) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/util/concurrent/TimeUnit", java.flags == PUBLIC, .name == "toMicros", .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/TimeUnit\0", "toMicros\0", "(J)J\0");
                __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [toMillis](https://developer.android.com/reference/java/util/concurrent/TimeUnit.html#toMillis(long))
        pub fn toMillis<'env>(&'env self, arg0: i64) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/util/concurrent/TimeUnit", java.flags == PUBLIC, .name == "toMillis", .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/TimeUnit\0", "toMillis\0", "(J)J\0");
                __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [toSeconds](https://developer.android.com/reference/java/util/concurrent/TimeUnit.html#toSeconds(long))
        pub fn toSeconds<'env>(&'env self, arg0: i64) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/util/concurrent/TimeUnit", java.flags == PUBLIC, .name == "toSeconds", .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/TimeUnit\0", "toSeconds\0", "(J)J\0");
                __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [toMinutes](https://developer.android.com/reference/java/util/concurrent/TimeUnit.html#toMinutes(long))
        pub fn toMinutes<'env>(&'env self, arg0: i64) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/util/concurrent/TimeUnit", java.flags == PUBLIC, .name == "toMinutes", .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/TimeUnit\0", "toMinutes\0", "(J)J\0");
                __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [toHours](https://developer.android.com/reference/java/util/concurrent/TimeUnit.html#toHours(long))
        pub fn toHours<'env>(&'env self, arg0: i64) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/util/concurrent/TimeUnit", java.flags == PUBLIC, .name == "toHours", .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/TimeUnit\0", "toHours\0", "(J)J\0");
                __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [toDays](https://developer.android.com/reference/java/util/concurrent/TimeUnit.html#toDays(long))
        pub fn toDays<'env>(&'env self, arg0: i64) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/util/concurrent/TimeUnit", java.flags == PUBLIC, .name == "toDays", .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/TimeUnit\0", "toDays\0", "(J)J\0");
                __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [timedWait](https://developer.android.com/reference/java/util/concurrent/TimeUnit.html#timedWait(java.lang.Object,%20long))
        ///
        /// Required features: "java-lang-Object"
        #[cfg(any(feature = "all", all(feature = "java-lang-Object")))]
        pub fn timedWait<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::Object>>, arg1: i64) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/util/concurrent/TimeUnit", java.flags == PUBLIC, .name == "timedWait", .descriptor == "(Ljava/lang/Object;J)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __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/TimeUnit\0", "timedWait\0", "(Ljava/lang/Object;J)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [timedJoin](https://developer.android.com/reference/java/util/concurrent/TimeUnit.html#timedJoin(java.lang.Thread,%20long))
        ///
        /// Required features: "java-lang-Thread"
        #[cfg(any(feature = "all", all(feature = "java-lang-Thread")))]
        pub fn timedJoin<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::Thread>>, arg1: i64) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/util/concurrent/TimeUnit", java.flags == PUBLIC, .name == "timedJoin", .descriptor == "(Ljava/lang/Thread;J)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __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/TimeUnit\0", "timedJoin\0", "(Ljava/lang/Thread;J)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [sleep](https://developer.android.com/reference/java/util/concurrent/TimeUnit.html#sleep(long))
        pub fn sleep<'env>(&'env self, arg0: i64) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/util/concurrent/TimeUnit", java.flags == PUBLIC, .name == "sleep", .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/TimeUnit\0", "sleep\0", "(J)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// **get** public static final [DAYS](https://developer.android.com/reference/java/util/concurrent/TimeUnit.html#DAYS)
        ///
        /// Required feature: "java-util-concurrent-TimeUnit"
        #[cfg(any(feature = "all", feature = "java-util-concurrent-TimeUnit"))]
        pub fn DAYS<'env>(env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::util::concurrent::TimeUnit>> {
            unsafe {
                let (__jni_class, __jni_field) = env.require_class_static_field("java/util/concurrent/TimeUnit\0", "DAYS\0", "Ljava/util/concurrent/TimeUnit;\0");
                env.get_static_object_field(__jni_class, __jni_field)
            }
        }

        /// **get** public static final [HOURS](https://developer.android.com/reference/java/util/concurrent/TimeUnit.html#HOURS)
        ///
        /// Required feature: "java-util-concurrent-TimeUnit"
        #[cfg(any(feature = "all", feature = "java-util-concurrent-TimeUnit"))]
        pub fn HOURS<'env>(env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::util::concurrent::TimeUnit>> {
            unsafe {
                let (__jni_class, __jni_field) = env.require_class_static_field("java/util/concurrent/TimeUnit\0", "HOURS\0", "Ljava/util/concurrent/TimeUnit;\0");
                env.get_static_object_field(__jni_class, __jni_field)
            }
        }

        /// **get** public static final [MICROSECONDS](https://developer.android.com/reference/java/util/concurrent/TimeUnit.html#MICROSECONDS)
        ///
        /// Required feature: "java-util-concurrent-TimeUnit"
        #[cfg(any(feature = "all", feature = "java-util-concurrent-TimeUnit"))]
        pub fn MICROSECONDS<'env>(env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::util::concurrent::TimeUnit>> {
            unsafe {
                let (__jni_class, __jni_field) = env.require_class_static_field("java/util/concurrent/TimeUnit\0", "MICROSECONDS\0", "Ljava/util/concurrent/TimeUnit;\0");
                env.get_static_object_field(__jni_class, __jni_field)
            }
        }

        /// **get** public static final [MILLISECONDS](https://developer.android.com/reference/java/util/concurrent/TimeUnit.html#MILLISECONDS)
        ///
        /// Required feature: "java-util-concurrent-TimeUnit"
        #[cfg(any(feature = "all", feature = "java-util-concurrent-TimeUnit"))]
        pub fn MILLISECONDS<'env>(env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::util::concurrent::TimeUnit>> {
            unsafe {
                let (__jni_class, __jni_field) = env.require_class_static_field("java/util/concurrent/TimeUnit\0", "MILLISECONDS\0", "Ljava/util/concurrent/TimeUnit;\0");
                env.get_static_object_field(__jni_class, __jni_field)
            }
        }

        /// **get** public static final [MINUTES](https://developer.android.com/reference/java/util/concurrent/TimeUnit.html#MINUTES)
        ///
        /// Required feature: "java-util-concurrent-TimeUnit"
        #[cfg(any(feature = "all", feature = "java-util-concurrent-TimeUnit"))]
        pub fn MINUTES<'env>(env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::util::concurrent::TimeUnit>> {
            unsafe {
                let (__jni_class, __jni_field) = env.require_class_static_field("java/util/concurrent/TimeUnit\0", "MINUTES\0", "Ljava/util/concurrent/TimeUnit;\0");
                env.get_static_object_field(__jni_class, __jni_field)
            }
        }

        /// **get** public static final [NANOSECONDS](https://developer.android.com/reference/java/util/concurrent/TimeUnit.html#NANOSECONDS)
        ///
        /// Required feature: "java-util-concurrent-TimeUnit"
        #[cfg(any(feature = "all", feature = "java-util-concurrent-TimeUnit"))]
        pub fn NANOSECONDS<'env>(env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::util::concurrent::TimeUnit>> {
            unsafe {
                let (__jni_class, __jni_field) = env.require_class_static_field("java/util/concurrent/TimeUnit\0", "NANOSECONDS\0", "Ljava/util/concurrent/TimeUnit;\0");
                env.get_static_object_field(__jni_class, __jni_field)
            }
        }

        /// **get** public static final [SECONDS](https://developer.android.com/reference/java/util/concurrent/TimeUnit.html#SECONDS)
        ///
        /// Required feature: "java-util-concurrent-TimeUnit"
        #[cfg(any(feature = "all", feature = "java-util-concurrent-TimeUnit"))]
        pub fn SECONDS<'env>(env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::util::concurrent::TimeUnit>> {
            unsafe {
                let (__jni_class, __jni_field) = env.require_class_static_field("java/util/concurrent/TimeUnit\0", "SECONDS\0", "Ljava/util/concurrent/TimeUnit;\0");
                env.get_static_object_field(__jni_class, __jni_field)
            }
        }
    }
}