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-time-temporal-TemporalAmount"))]
__jni_bindgen! {
    /// public interface [TemporalAmount](https://developer.android.com/reference/java/time/temporal/TemporalAmount.html)
    ///
    /// Required feature: "java-time-temporal-TemporalAmount"
    public interface TemporalAmount ("java/time/temporal/TemporalAmount") extends crate::java::lang::Object {

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

        /// [getUnits](https://developer.android.com/reference/java/time/temporal/TemporalAmount.html#getUnits())
        ///
        /// Required features: "java-util-List"
        #[cfg(any(feature = "all", all(feature = "java-util-List")))]
        pub fn getUnits<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::util::List>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/time/temporal/TemporalAmount", java.flags == PUBLIC | ABSTRACT, .name == "getUnits", .descriptor == "()Ljava/util/List;"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("java/time/temporal/TemporalAmount\0", "getUnits\0", "()Ljava/util/List;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [addTo](https://developer.android.com/reference/java/time/temporal/TemporalAmount.html#addTo(java.time.temporal.Temporal))
        ///
        /// Required features: "java-time-temporal-Temporal"
        #[cfg(any(feature = "all", all(feature = "java-time-temporal-Temporal")))]
        pub fn addTo<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::time::temporal::Temporal>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::time::temporal::Temporal>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/time/temporal/TemporalAmount", java.flags == PUBLIC | ABSTRACT, .name == "addTo", .descriptor == "(Ljava/time/temporal/Temporal;)Ljava/time/temporal/Temporal;"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("java/time/temporal/TemporalAmount\0", "addTo\0", "(Ljava/time/temporal/Temporal;)Ljava/time/temporal/Temporal;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [subtractFrom](https://developer.android.com/reference/java/time/temporal/TemporalAmount.html#subtractFrom(java.time.temporal.Temporal))
        ///
        /// Required features: "java-time-temporal-Temporal"
        #[cfg(any(feature = "all", all(feature = "java-time-temporal-Temporal")))]
        pub fn subtractFrom<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::time::temporal::Temporal>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::time::temporal::Temporal>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/time/temporal/TemporalAmount", java.flags == PUBLIC | ABSTRACT, .name == "subtractFrom", .descriptor == "(Ljava/time/temporal/Temporal;)Ljava/time/temporal/Temporal;"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("java/time/temporal/TemporalAmount\0", "subtractFrom\0", "(Ljava/time/temporal/Temporal;)Ljava/time/temporal/Temporal;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }
    }
}