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


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

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

        // // Not emitting: Non-public method
        // /// [ConstantCallSite](https://developer.android.com/reference/java/lang/invoke/ConstantCallSite.html#ConstantCallSite(java.lang.invoke.MethodType,%20java.lang.invoke.MethodHandle))
        // ///
        // /// Required features: "java-lang-invoke-MethodHandle", "java-lang-invoke-MethodType"
        // #[cfg(any(feature = "all", all(feature = "java-lang-invoke-MethodHandle", feature = "java-lang-invoke-MethodType")))]
        // 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::invoke::MethodType>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::invoke::MethodHandle>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::Local<'env, crate::java::lang::invoke::ConstantCallSite>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
        //     // class.path == "java/lang/invoke/ConstantCallSite", java.flags == PROTECTED, .name == "<init>", .descriptor == "(Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;)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/lang/invoke/ConstantCallSite\0", "<init>\0", "(Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;)V\0");
        //         __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr())
        //     }
        // }

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

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

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