Update auto-updated Java files
[ldk-java] / src / main / java / org / ldk / structs / Invoice.java
index 8817ed413f5c9b086fab29047c8559b744d948dc..5b02d9eb41f495bfb6143388ec2dba06d409ffa6 100644 (file)
@@ -4,6 +4,7 @@ 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;
 
 
@@ -31,12 +32,19 @@ public class Invoice extends CommonBase {
         */
        public boolean eq(Invoice b) {
                boolean ret = bindings.Invoice_eq(this.ptr, b == null ? 0 : b.ptr & ~1);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
                this.ptrs_to.add(b);
                return ret;
        }
 
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof Invoice)) return false;
+               return this.eq((Invoice)o);
+       }
        long clone_ptr() {
                long ret = bindings.Invoice_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }
 
@@ -45,6 +53,7 @@ public class Invoice extends CommonBase {
         */
        public Invoice clone() {
                long ret = bindings.Invoice_clone(this.ptr);
+               Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                Invoice ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new Invoice(null, ret); }
                ret_hu_conv.ptrs_to.add(this);
@@ -56,6 +65,7 @@ public class Invoice extends CommonBase {
         */
        public SignedRawInvoice into_signed_raw() {
                long ret = bindings.Invoice_into_signed_raw(this.ptr);
+               Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                SignedRawInvoice ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new SignedRawInvoice(null, ret); }
                ret_hu_conv.ptrs_to.add(this);
@@ -68,6 +78,7 @@ public class Invoice extends CommonBase {
         */
        public Result_NoneSemanticErrorZ check_signature() {
                long ret = bindings.Invoice_check_signature(this.ptr);
+               Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NoneSemanticErrorZ ret_hu_conv = Result_NoneSemanticErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
@@ -97,6 +108,7 @@ public class Invoice extends CommonBase {
         */
        public static Result_InvoiceSemanticErrorZ from_signed(SignedRawInvoice signed_invoice) {
                long ret = bindings.Invoice_from_signed(signed_invoice == null ? 0 : signed_invoice.ptr & ~1);
+               Reference.reachabilityFence(signed_invoice);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_InvoiceSemanticErrorZ ret_hu_conv = Result_InvoiceSemanticErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
@@ -107,6 +119,7 @@ public class Invoice extends CommonBase {
         */
        public long timestamp() {
                long ret = bindings.Invoice_timestamp(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }
 
@@ -115,6 +128,7 @@ public class Invoice extends CommonBase {
         */
        public byte[] payment_hash() {
                byte[] ret = bindings.Invoice_payment_hash(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }
 
@@ -126,6 +140,7 @@ public class Invoice extends CommonBase {
        @Nullable
        public byte[] payee_pub_key() {
                byte[] ret = bindings.Invoice_payee_pub_key(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }
 
@@ -134,6 +149,7 @@ public class Invoice extends CommonBase {
         */
        public byte[] payment_secret() {
                byte[] ret = bindings.Invoice_payment_secret(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }
 
@@ -145,6 +161,7 @@ public class Invoice extends CommonBase {
        @Nullable
        public InvoiceFeatures features() {
                long ret = bindings.Invoice_features(this.ptr);
+               Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                InvoiceFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new InvoiceFeatures(null, ret); }
                ret_hu_conv.ptrs_to.add(this);
@@ -156,6 +173,7 @@ public class Invoice extends CommonBase {
         */
        public byte[] recover_payee_pub_key() {
                byte[] ret = bindings.Invoice_recover_payee_pub_key(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }
 
@@ -164,6 +182,7 @@ public class Invoice extends CommonBase {
         */
        public long expiry_time() {
                long ret = bindings.Invoice_expiry_time(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }
 
@@ -172,6 +191,7 @@ public class Invoice extends CommonBase {
         */
        public boolean is_expired() {
                boolean ret = bindings.Invoice_is_expired(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }
 
@@ -181,6 +201,7 @@ public class Invoice extends CommonBase {
         */
        public long min_final_cltv_expiry() {
                long ret = bindings.Invoice_min_final_cltv_expiry(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }
 
@@ -189,6 +210,7 @@ public class Invoice extends CommonBase {
         */
        public PrivateRoute[] private_routes() {
                long[] ret = bindings.Invoice_private_routes(this.ptr);
+               Reference.reachabilityFence(this);
                PrivateRoute[] ret_conv_14_arr = new PrivateRoute[ret.length];
                for (int o = 0; o < ret.length; o++) {
                        long ret_conv_14 = ret[o];
@@ -204,6 +226,7 @@ public class Invoice extends CommonBase {
         */
        public RouteHint[] route_hints() {
                long[] ret = bindings.Invoice_route_hints(this.ptr);
+               Reference.reachabilityFence(this);
                RouteHint[] ret_conv_11_arr = new RouteHint[ret.length];
                for (int l = 0; l < ret.length; l++) {
                        long ret_conv_11 = ret[l];
@@ -219,6 +242,7 @@ public class Invoice extends CommonBase {
         */
        public Currency currency() {
                Currency ret = bindings.Invoice_currency(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }
 
@@ -227,6 +251,7 @@ public class Invoice extends CommonBase {
         */
        public Option_u64Z amount_milli_satoshis() {
                long ret = bindings.Invoice_amount_milli_satoshis(this.ptr);
+               Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(this);
@@ -238,6 +263,7 @@ public class Invoice extends CommonBase {
         */
        public static Result_InvoiceNoneZ from_str(java.lang.String s) {
                long ret = bindings.Invoice_from_str(s);
+               Reference.reachabilityFence(s);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_InvoiceNoneZ ret_hu_conv = Result_InvoiceNoneZ.constr_from_ptr(ret);
                return ret_hu_conv;
@@ -248,6 +274,7 @@ public class Invoice extends CommonBase {
         */
        public String to_str() {
                String ret = bindings.Invoice_to_str(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }