Update java bindings with new generator and new upstream code
[ldk-java] / src / main / java / org / ldk / structs / DecodeError.java
index e8cec47071df259dcd5318d91d8e9bd1392502f7..5a7703fcc97e0f77ab5a346067dab6c1c457edd4 100644 (file)
@@ -5,6 +5,10 @@ import org.ldk.enums.*;
 import org.ldk.util.*;
 import java.util.Arrays;
 
+
+/**
+ * An error in decoding a message or struct.
+ */
 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
 public class DecodeError extends CommonBase {
        DecodeError(Object _dummy, long ptr) { super(ptr); }
@@ -14,4 +18,14 @@ public class DecodeError extends CommonBase {
                if (ptr != 0) { bindings.DecodeError_free(ptr); }
        }
 
+       /**
+        * Creates a copy of the DecodeError
+        */
+       public DecodeError clone() {
+               long ret = bindings.DecodeError_clone(this.ptr);
+               DecodeError ret_hu_conv = new DecodeError(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }