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 = "android-util-Rational"))]
__jni_bindgen! {
    /// public final class [Rational](https://developer.android.com/reference/android/util/Rational.html)
    ///
    /// Required feature: "android-util-Rational"
    public final class Rational ("android/util/Rational") extends crate::java::lang::Number, implements crate::java::lang::Comparable {

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

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

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

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

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

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

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

        /// [equals](https://developer.android.com/reference/android/util/Rational.html#equals(java.lang.Object))
        ///
        /// Required features: "java-lang-Object"
        #[cfg(any(feature = "all", all(feature = "java-lang-Object")))]
        pub fn equals<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::Object>>) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/util/Rational", java.flags == PUBLIC, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z"
            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("android/util/Rational\0", "equals\0", "(Ljava/lang/Object;)Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [toString](https://developer.android.com/reference/android/util/Rational.html#toString())
        ///
        /// Required features: "java-lang-String"
        #[cfg(any(feature = "all", all(feature = "java-lang-String")))]
        pub fn toString<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::lang::String>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/util/Rational", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;"
            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("android/util/Rational\0", "toString\0", "()Ljava/lang/String;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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

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

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

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

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

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

        /// [compareTo](https://developer.android.com/reference/android/util/Rational.html#compareTo(android.util.Rational))
        ///
        /// Required features: "android-util-Rational"
        #[cfg(any(feature = "all", all(feature = "android-util-Rational")))]
        pub fn compareTo_Rational<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::util::Rational>>) -> __jni_bindgen::std::result::Result<i32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/util/Rational", java.flags == PUBLIC, .name == "compareTo", .descriptor == "(Landroid/util/Rational;)I"
            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("android/util/Rational\0", "compareTo\0", "(Landroid/util/Rational;)I\0");
                __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [parseRational](https://developer.android.com/reference/android/util/Rational.html#parseRational(java.lang.String))
        ///
        /// Required features: "android-util-Rational", "java-lang-String"
        #[cfg(any(feature = "all", all(feature = "android-util-Rational", feature = "java-lang-String")))]
        pub fn parseRational<'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::android::util::Rational>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/util/Rational", java.flags == PUBLIC | STATIC, .name == "parseRational", .descriptor == "(Ljava/lang/String;)Landroid/util/Rational;"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
                let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/util/Rational\0", "parseRational\0", "(Ljava/lang/String;)Landroid/util/Rational;\0");
                __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

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

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

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

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