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-text-SpannableString"))]
__jni_bindgen! {
    /// public class [SpannableString](https://developer.android.com/reference/android/text/SpannableString.html)
    ///
    /// Required feature: "android-text-SpannableString"
    public class SpannableString ("android/text/SpannableString") extends crate::android::text::SpannableStringInternal, implements crate::java::lang::CharSequence, crate::android::text::GetChars, crate::android::text::Spannable {

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

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

        /// [setSpan](https://developer.android.com/reference/android/text/SpannableString.html#setSpan(java.lang.Object,%20int,%20int,%20int))
        ///
        /// Required features: "java-lang-Object"
        #[cfg(any(feature = "all", all(feature = "java-lang-Object")))]
        pub fn setSpan<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::Object>>, arg1: i32, arg2: i32, arg3: i32) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/text/SpannableString", java.flags == PUBLIC, .name == "setSpan", .descriptor == "(Ljava/lang/Object;III)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1), __jni_bindgen::AsJValue::as_jvalue(&arg2), __jni_bindgen::AsJValue::as_jvalue(&arg3)];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/text/SpannableString\0", "setSpan\0", "(Ljava/lang/Object;III)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [removeSpan](https://developer.android.com/reference/android/text/SpannableString.html#removeSpan(java.lang.Object))
        ///
        /// Required features: "java-lang-Object"
        #[cfg(any(feature = "all", all(feature = "java-lang-Object")))]
        pub fn removeSpan<'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<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/text/SpannableString", java.flags == PUBLIC, .name == "removeSpan", .descriptor == "(Ljava/lang/Object;)V"
            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/text/SpannableString\0", "removeSpan\0", "(Ljava/lang/Object;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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