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-nio-channels-spi-SelectorProvider"))]
__jni_bindgen! {
    /// public class [SelectorProvider](https://developer.android.com/reference/java/nio/channels/spi/SelectorProvider.html)
    ///
    /// Required feature: "java-nio-channels-spi-SelectorProvider"
    public class SelectorProvider ("java/nio/channels/spi/SelectorProvider") extends crate::java::lang::Object {

        /// [provider](https://developer.android.com/reference/java/nio/channels/spi/SelectorProvider.html#provider())
        ///
        /// Required features: "java-nio-channels-spi-SelectorProvider"
        #[cfg(any(feature = "all", all(feature = "java-nio-channels-spi-SelectorProvider")))]
        pub fn provider<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::nio::channels::spi::SelectorProvider>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/nio/channels/spi/SelectorProvider", java.flags == PUBLIC | STATIC, .name == "provider", .descriptor == "()Ljava/nio/channels/spi/SelectorProvider;"
            unsafe {
                let __jni_args = [];
                let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/nio/channels/spi/SelectorProvider\0", "provider\0", "()Ljava/nio/channels/spi/SelectorProvider;\0");
                __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

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

        /// [openDatagramChannel](https://developer.android.com/reference/java/nio/channels/spi/SelectorProvider.html#openDatagramChannel(java.net.ProtocolFamily))
        ///
        /// Required features: "java-net-ProtocolFamily", "java-nio-channels-DatagramChannel"
        #[cfg(any(feature = "all", all(feature = "java-net-ProtocolFamily", feature = "java-nio-channels-DatagramChannel")))]
        pub fn openDatagramChannel_ProtocolFamily<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::net::ProtocolFamily>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::nio::channels::DatagramChannel>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/nio/channels/spi/SelectorProvider", java.flags == PUBLIC | ABSTRACT, .name == "openDatagramChannel", .descriptor == "(Ljava/net/ProtocolFamily;)Ljava/nio/channels/DatagramChannel;"
            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/nio/channels/spi/SelectorProvider\0", "openDatagramChannel\0", "(Ljava/net/ProtocolFamily;)Ljava/nio/channels/DatagramChannel;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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

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

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

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

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