[Java] Print error stack trace when tests fail
[ldk-java] / src / main / java / org / ldk / structs / Result_NoneNoneZ.java
1 package org.ldk.structs;
2
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
5 import org.ldk.util.*;
6 import java.util.Arrays;
7 import java.lang.ref.Reference;
8 import javax.annotation.Nullable;
9
10 public class Result_NoneNoneZ extends CommonBase {
11         private Result_NoneNoneZ(Object _dummy, long ptr) { super(ptr); }
12         protected void finalize() throws Throwable {
13                 if (ptr != 0) { bindings.CResult_NoneNoneZ_free(ptr); } super.finalize();
14         }
15
16         protected void force_free() {
17                 if (ptr != 0) { bindings.CResult_NoneNoneZ_free(ptr); ptr = 0; }
18         }
19
20         static Result_NoneNoneZ constr_from_ptr(long ptr) {
21                 if (bindings.CResult_NoneNoneZ_is_ok(ptr)) {
22                         return new Result_NoneNoneZ_OK(null, ptr);
23                 } else {
24                         return new Result_NoneNoneZ_Err(null, ptr);
25                 }
26         }
27         public static final class Result_NoneNoneZ_OK extends Result_NoneNoneZ {
28                 private Result_NoneNoneZ_OK(Object _dummy, long ptr) {
29                         super(_dummy, ptr);
30                 }
31         }
32
33         public static final class Result_NoneNoneZ_Err extends Result_NoneNoneZ {
34                 private Result_NoneNoneZ_Err(Object _dummy, long ptr) {
35                         super(_dummy, ptr);
36                 }
37         }
38
39         /**
40          * Creates a new CResult_NoneNoneZ in the success state.
41          */
42         public static Result_NoneNoneZ ok() {
43                 long ret = bindings.CResult_NoneNoneZ_ok();
44                 if (ret >= 0 && ret <= 4096) { return null; }
45                 Result_NoneNoneZ ret_hu_conv = Result_NoneNoneZ.constr_from_ptr(ret);
46                 return ret_hu_conv;
47         }
48
49         /**
50          * Creates a new CResult_NoneNoneZ in the error state.
51          */
52         public static Result_NoneNoneZ err() {
53                 long ret = bindings.CResult_NoneNoneZ_err();
54                 if (ret >= 0 && ret <= 4096) { return null; }
55                 Result_NoneNoneZ ret_hu_conv = Result_NoneNoneZ.constr_from_ptr(ret);
56                 return ret_hu_conv;
57         }
58
59         /**
60          * Checks if the given object is currently in the success state
61          */
62         public boolean is_ok() {
63                 boolean ret = bindings.CResult_NoneNoneZ_is_ok(this.ptr);
64                 Reference.reachabilityFence(this);
65                 return ret;
66         }
67
68         long clone_ptr() {
69                 long ret = bindings.CResult_NoneNoneZ_clone_ptr(this.ptr);
70                 Reference.reachabilityFence(this);
71                 return ret;
72         }
73
74         /**
75          * Creates a new CResult_NoneNoneZ which has the same data as `orig`
76          * but with all dynamically-allocated buffers duplicated in new buffers.
77          */
78         public Result_NoneNoneZ clone() {
79                 long ret = bindings.CResult_NoneNoneZ_clone(this.ptr);
80                 Reference.reachabilityFence(this);
81                 if (ret >= 0 && ret <= 4096) { return null; }
82                 Result_NoneNoneZ ret_hu_conv = Result_NoneNoneZ.constr_from_ptr(ret);
83                 return ret_hu_conv;
84         }
85
86 }