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

        /// [SpannedString](https://developer.android.com/reference/android/text/SpannedString.html#SpannedString(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::SpannedString>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/text/SpannedString", 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/SpannedString\0", "<init>\0", "(Ljava/lang/CharSequence;)V\0");
                __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [subSequence](https://developer.android.com/reference/android/text/SpannedString.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/SpannedString", java.flags == PUBLIC, .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/SpannedString\0", "subSequence\0", "(II)Ljava/lang/CharSequence;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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