1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// WARNING:  This file was autogenerated by jni-bindgen.  Any changes to this file may be lost!!!


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

        /// [cancel](https://developer.android.com/reference/java/util/concurrent/Future.html#cancel(boolean))
        pub fn cancel<'env>(&'env self, arg0: bool) -> __jni_bindgen::Result<bool> {
            // class.path == "java/util/concurrent/Future", java.flags == PUBLIC | ABSTRACT, .name == "cancel", .descriptor == "(Z)Z"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/concurrent/Future\0", "cancel\0", "(Z)Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [isCancelled](https://developer.android.com/reference/java/util/concurrent/Future.html#isCancelled())
        pub fn is_cancelled<'env>(&'env self) -> __jni_bindgen::Result<bool> {
            // class.path == "java/util/concurrent/Future", java.flags == PUBLIC | ABSTRACT, .name == "isCancelled", .descriptor == "()Z"
            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/util/concurrent/Future\0", "isCancelled\0", "()Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [isDone](https://developer.android.com/reference/java/util/concurrent/Future.html#isDone())
        pub fn is_done<'env>(&'env self) -> __jni_bindgen::Result<bool> {
            // class.path == "java/util/concurrent/Future", java.flags == PUBLIC | ABSTRACT, .name == "isDone", .descriptor == "()Z"
            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/util/concurrent/Future\0", "isDone\0", "()Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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

        /// [get](https://developer.android.com/reference/java/util/concurrent/Future.html#get(long,%2520java,%2520util,%2520concurrent,%2520TimeUnit))
        ///
        /// Required features: "java-lang-Object", "java-util-concurrent-TimeUnit"
        #[cfg(any(feature = "all", all(feature = "java-lang-Object", feature = "java-util-concurrent-TimeUnit")))]
        pub fn get_long_time_unit<'env>(&'env self, arg0: i64, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::util::concurrent::TimeUnit>>) -> __jni_bindgen::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::lang::Object>>> {
            // class.path == "java/util/concurrent/Future", java.flags == PUBLIC | ABSTRACT, .name == "get", .descriptor == "(JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0), __jni_bindgen::AsJValue::as_jvalue(&arg1.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/concurrent/Future\0", "get\0", "(JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }
    }
}