1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
7 import java.lang.ref.Reference;
8 import javax.annotation.Nullable;
12 * An error in decoding a message or struct.
14 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
15 public class DecodeError extends CommonBase {
16 DecodeError(Object _dummy, long ptr) { super(ptr); }
17 @Override @SuppressWarnings("deprecation")
18 protected void finalize() throws Throwable {
20 if (ptr != 0) { bindings.DecodeError_free(ptr); }
24 long ret = bindings.DecodeError_clone_ptr(this.ptr);
25 Reference.reachabilityFence(this);
30 * Creates a copy of the DecodeError
32 public DecodeError clone() {
33 long ret = bindings.DecodeError_clone(this.ptr);
34 Reference.reachabilityFence(this);
35 if (ret >= 0 && ret <= 4096) { return null; }
36 org.ldk.structs.DecodeError ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.DecodeError(null, ret); }
37 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };