// WARNING:  This file was autogenerated by jni-bindgen.  Any changes to this file may be lost!!!


#[cfg(any(feature = "all", feature = "java-security-ProtectionDomain"))]
__jni_bindgen! {
    /// public class [ProtectionDomain](https://developer.android.com/reference/java/security/ProtectionDomain.html)
    ///
    /// Required feature: java-security-ProtectionDomain
    public class ProtectionDomain ("java/security/ProtectionDomain") extends crate::java::lang::Object {

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

        /// [ProtectionDomain](https://developer.android.com/reference/java/security/ProtectionDomain.html#ProtectionDomain(java.security.CodeSource,%20java.security.PermissionCollection,%20java.lang.ClassLoader,%20java.security.Principal%5B%5D))
        ///
        /// Required features: "java-lang-ClassLoader", "java-security-CodeSource", "java-security-PermissionCollection", "java-security-Principal"
        #[cfg(any(feature = "all", all(feature = "java-lang-ClassLoader", feature = "java-security-CodeSource", feature = "java-security-PermissionCollection", feature = "java-security-Principal")))]
        pub fn new_CodeSource_PermissionCollection_ClassLoader_Principal_array<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::security::CodeSource>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::security::PermissionCollection>>, arg2: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::ClassLoader>>, arg3: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env __jni_bindgen::ObjectArray<crate::java::security::Principal, crate::java::lang::Throwable>>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::Local<'env, crate::java::security::ProtectionDomain>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/security/ProtectionDomain", java.flags == PUBLIC, .name == "<init>", .descriptor == "(Ljava/security/CodeSource;Ljava/security/PermissionCollection;Ljava/lang/ClassLoader;[Ljava/security/Principal;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into()), __jni_bindgen::AsJValue::as_jvalue(&arg2.into()), __jni_bindgen::AsJValue::as_jvalue(&arg3.into())];
                let (__jni_class, __jni_method) = __jni_env.require_class_method("java/security/ProtectionDomain\0", "<init>\0", "(Ljava/security/CodeSource;Ljava/security/PermissionCollection;Ljava/lang/ClassLoader;[Ljava/security/Principal;)V\0");
                __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

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

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

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

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

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