]> git.bitcoin.ninja Git - ldk-java/blob - src/main/java/org/ldk/structs/LightningError.java
Fix race in tests
[ldk-java] / src / main / java / org / ldk / structs / LightningError.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
8 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
9 public class LightningError extends CommonBase {
10         LightningError(Object _dummy, long ptr) { super(ptr); }
11         @Override @SuppressWarnings("deprecation")
12         protected void finalize() throws Throwable {
13                 super.finalize();
14                 if (ptr != 0) { bindings.LightningError_free(ptr); }
15         }
16
17         public String get_err() {
18                 String ret = bindings.LightningError_get_err(this.ptr);
19                 return ret;
20         }
21
22         public void set_err(byte[] val) {
23                 bindings.LightningError_set_err(this.ptr, val);
24         }
25
26         public ErrorAction get_action() {
27                 long ret = bindings.LightningError_get_action(this.ptr);
28                 ErrorAction ret_hu_conv = ErrorAction.constr_from_ptr(ret);
29                 ret_hu_conv.ptrs_to.add(this);
30                 return ret_hu_conv;
31         }
32
33         public void set_action(ErrorAction val) {
34                 bindings.LightningError_set_action(this.ptr, val.ptr);
35         }
36
37         public static LightningError constructor_new(byte[] err_arg, ErrorAction action_arg) {
38                 long ret = bindings.LightningError_new(err_arg, action_arg.ptr);
39                 LightningError ret_hu_conv = new LightningError(null, ret);
40                 return ret_hu_conv;
41         }
42
43 }