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-math-MathContext"))]
__jni_bindgen! {
    /// public final class [MathContext](https://developer.android.com/reference/java/math/MathContext.html)
    ///
    /// Required feature: "java-math-MathContext"
    public final class MathContext ("java/math/MathContext") extends crate::java::lang::Object, implements crate::java::io::Serializable {

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

        /// [MathContext](https://developer.android.com/reference/java/math/MathContext.html#MathContext(int,%20java.math.RoundingMode))
        ///
        /// Required features: "java-math-RoundingMode"
        #[cfg(any(feature = "all", all(feature = "java-math-RoundingMode")))]
        pub fn new_int_RoundingMode<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: i32, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::math::RoundingMode>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::Local<'env, crate::java::math::MathContext>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/math/MathContext", java.flags == PUBLIC, .name == "<init>", .descriptor == "(ILjava/math/RoundingMode;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0), __jni_bindgen::AsJValue::as_jvalue(&arg1.into())];
                let (__jni_class, __jni_method) = __jni_env.require_class_method("java/math/MathContext\0", "<init>\0", "(ILjava/math/RoundingMode;)V\0");
                __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

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

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

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

        /// [equals](https://developer.android.com/reference/java/math/MathContext.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 == "java/math/MathContext", 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("java/math/MathContext\0", "equals\0", "(Ljava/lang/Object;)Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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

        /// [toString](https://developer.android.com/reference/java/math/MathContext.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 == "java/math/MathContext", 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("java/math/MathContext\0", "toString\0", "()Ljava/lang/String;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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

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

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

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