pub unsafe fn call_static_method<'a, T, A, R, F>(
    env: &'a JniEnv<'a>,
    token: &NoException<'a>,
    name: &str,
    arguments: A,
) -> JavaResult<'a, R::ResultType>
where
    T: JavaClassRef<'a>,
    A: JavaArgumentTuple,
    R: JavaMethodResult<'a>,
    F: JavaMethodSignature<A, R>,
{
    R::call_static_method::<T, A>(env, token, name, &F::method_signature(), arguments)
}
/// Call a static Java method.
///
/// The method has four generic parameters:
///  - The first one is the class of the object. Can be inferred
///  - The second one is the type of the arguments tuple. Can be inferred
///  - The third one is the Java result type. Can be inferred
///  - The fourth one is the signature of the Java method. Must be specified
///
/// As a result, only one generic parameter needs to be specified -- the last one.
///
/// Example:
/// ```
/// # use rust_jni::*;
/// # use rust_jni::java::lang::String;
/// # use std::ptr;
/// #
/// # fn jni_main<'a>(env: &'a JniEnv<'a>, token: NoException<'a>) -> JavaResult<'a, NoException<'a>> {
/// // Safe because correct arguments are passed and correct return type specified.
/// // See `String::valueOf(int)` javadoc:
/// // https://docs.oracle.com/javase/10/docs/api/java/lang/String.html#valueOf(int)
/// let string_value = unsafe {
///     call_static_method::<String<'a>, _, _, fn(i32) -> String<'a>>(
///         env,
///         &token,
///         "valueOf\0",
///         (17,),
///     )
/// }
/// .or_npe(env, &token)?
/// .as_string(&token);
/// assert_eq!(string_value, "17");
/// # Ok(token)
/// # }
/// #
/// # fn main() {
/// #     let init_arguments = InitArguments::default();
/// #     let vm = JavaVM::create(&init_arguments).unwrap();
/// #     let _ = vm.with_attached(
/// #        &AttachArguments::new(init_arguments.version()),
/// #        |env: &JniEnv, token: NoException| {
/// #            ((), jni_main(env, token).unwrap())
/// #        },
/// #     );
/// # }
/// ```
///
/// Note that method name string must be null-terminating.
///
/// See more info about how to pass or return types from Java calls in [`JniSignature`](trait.JniSignature.html)
/// documentation
///
/// This method is unsafe because incorrect parameters can be passed to a method or incorrect return type specified.
Call a static Java method.
The method has four generic parameters:
The first one is the class of the object. Can be inferred
The second one is the type of the arguments tuple. Can be inferred
The third one is the Java result type. Can be inferred
The fourth one is the signature of the Java method. Must be specified

As a result, only one generic parameter needs to be specified -- the last one.


Call a static Java method . The method has four generic parameters : The first one is the class of the object . Can be inferred The second one is the type of the arguments tuple . Can be inferred The third one is the Java result type . Can be inferred The fourth one is the signature of the Java method . Must be specified As a result only one generic parameter needs to be specified -- the last one .
pub unsafe fn call_static_method<'a, T, A, R, F>(
    env: &'a JniEnv<'a>,
    token: &NoException<'a>,
    name: &str,
    arguments: A,
) -> JavaResult<'a, R::ResultType>
where
    T: JavaClassRef<'a>,
    A: JavaArgumentTuple,
    R: JavaMethodResult<'a>,
    F: JavaMethodSignature<A, R>,
{
    R::call_static_method::<T, A>(env, token, name, &F::method_signature(), arguments)
}
pub unsafe fn call_static_method < ' a , T , A , R , F > ( env : & ' a JniEnv < ' a > , token : & NoException < ' a > , name : & str , arguments : A , ) -> JavaResult < ' a , R :: ResultType > where T : JavaClassRef < ' a > , A : JavaArgumentTuple , R : JavaMethodResult < ' a > , F : JavaMethodSignature < A , R > , { R :: call_static_method :: < T , A > ( env , token , name , & F :: method_signature ( ) , arguments ) }
Call a static Java method.
Call a static Java method .
env
&'a JniEnv<'a>
token
&NoException<'a>
name
&str
arguments
A
env
&'a JniEnv<'a>
token
&NoException<'a>
name
&str
arguments
A
use rust_jni::*;
None
use rust_jni::java::lang::string;
None
use std::ptr;
None
fn jni_main<'a>(env: &'a jnienv<'a>, token: noexception<'a>) -> javaresult<'a, noexception<'a>> {
Safe because correct arguments are passed and correct return type specified.
Safe because correct arguments are passed and correct return type specified .
ok(token)
None
}
None
fn main() {
None
let init_arguments = initarguments::default();
None
let vm = javavm::create(&init_arguments).unwrap();
None
let _ = vm.with_attached(
None
&attacharguments::new(init_arguments.version()),
None
|env: &jnienv, token: noexception| {
None
((), jni_main(env, token).unwrap())
None
},
None
);
None
}


Note that method name string must be null-terminating.

See more info about how to pass or return types from Java calls in [`JniSignature`](trait.JniSignature.html)
documentation

This method is unsafe because incorrect parameters can be passed to a method or incorrect return type specified.
Note that method name string must be null - terminating . See more info about how to pass or return types from Java calls in [ ` JniSignature ` ] ( trait . JniSignature . html ) documentation This method is unsafe because incorrect parameters can be passed to a method or incorrect return type specified .