Update auto-updated Java files
[ldk-java] / src / main / java / org / ldk / structs / ChannelHandshakeConfig.java
index bf53b65c972409d66b33d207d19cc81ffd18c208..9f42abadefd8b7820a2dbf86665b6961362e0570 100644 (file)
@@ -4,6 +4,8 @@ import org.ldk.impl.bindings;
 import org.ldk.enums.*;
 import org.ldk.util.*;
 import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
 
 
 /**
@@ -29,6 +31,7 @@ public class ChannelHandshakeConfig extends CommonBase {
         */
        public int get_minimum_depth() {
                int ret = bindings.ChannelHandshakeConfig_get_minimum_depth(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }
 
@@ -41,6 +44,8 @@ public class ChannelHandshakeConfig extends CommonBase {
         */
        public void set_minimum_depth(int val) {
                bindings.ChannelHandshakeConfig_set_minimum_depth(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
        }
 
        /**
@@ -62,6 +67,7 @@ public class ChannelHandshakeConfig extends CommonBase {
         */
        public short get_our_to_self_delay() {
                short ret = bindings.ChannelHandshakeConfig_get_our_to_self_delay(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }
 
@@ -84,6 +90,8 @@ public class ChannelHandshakeConfig extends CommonBase {
         */
        public void set_our_to_self_delay(short val) {
                bindings.ChannelHandshakeConfig_set_our_to_self_delay(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
        }
 
        /**
@@ -97,6 +105,7 @@ public class ChannelHandshakeConfig extends CommonBase {
         */
        public long get_our_htlc_minimum_msat() {
                long ret = bindings.ChannelHandshakeConfig_get_our_htlc_minimum_msat(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }
 
@@ -111,24 +120,38 @@ public class ChannelHandshakeConfig extends CommonBase {
         */
        public void set_our_htlc_minimum_msat(long val) {
                bindings.ChannelHandshakeConfig_set_our_htlc_minimum_msat(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
        }
 
        /**
         * Constructs a new ChannelHandshakeConfig given each field
         */
-       public static ChannelHandshakeConfig constructor_new(int minimum_depth_arg, short our_to_self_delay_arg, long our_htlc_minimum_msat_arg) {
+       public static ChannelHandshakeConfig of(int minimum_depth_arg, short our_to_self_delay_arg, long our_htlc_minimum_msat_arg) {
                long ret = bindings.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
-               ChannelHandshakeConfig ret_hu_conv = new ChannelHandshakeConfig(null, ret);
+               Reference.reachabilityFence(minimum_depth_arg);
+               Reference.reachabilityFence(our_to_self_delay_arg);
+               Reference.reachabilityFence(our_htlc_minimum_msat_arg);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               ChannelHandshakeConfig ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ChannelHandshakeConfig(null, ret); }
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                return ret_hu_conv;
        }
 
+       long clone_ptr() {
+               long ret = bindings.ChannelHandshakeConfig_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
        /**
         * Creates a copy of the ChannelHandshakeConfig
         */
        public ChannelHandshakeConfig clone() {
                long ret = bindings.ChannelHandshakeConfig_clone(this.ptr);
-               ChannelHandshakeConfig ret_hu_conv = new ChannelHandshakeConfig(null, ret);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               ChannelHandshakeConfig ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ChannelHandshakeConfig(null, ret); }
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
@@ -136,9 +159,10 @@ public class ChannelHandshakeConfig extends CommonBase {
        /**
         * Creates a "default" ChannelHandshakeConfig. See struct and individual field documentaiton for details on which values are used.
         */
-       public static ChannelHandshakeConfig constructor_default() {
+       public static ChannelHandshakeConfig with_default() {
                long ret = bindings.ChannelHandshakeConfig_default();
-               ChannelHandshakeConfig ret_hu_conv = new ChannelHandshakeConfig(null, ret);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               ChannelHandshakeConfig ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ChannelHandshakeConfig(null, ret); }
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                return ret_hu_conv;
        }