Use AutoCloseable for structs named Locked*
[ldk-java] / src / main / java / org / ldk / structs / RouteHop.java
index 54210f7ceb682211cf988b6962b2ec18692f7d79..a094d172fab0f112d086d85d7e8464eb2af7c7e2 100644 (file)
@@ -7,7 +7,8 @@ public class RouteHop extends CommonBase {
        RouteHop(Object _dummy, long ptr) { super(ptr); }
        @Override @SuppressWarnings("deprecation")
        protected void finalize() throws Throwable {
-               bindings.RouteHop_free(ptr); super.finalize();
+               super.finalize();
+               bindings.RouteHop_free(ptr);
        }
 
        public RouteHop(RouteHop orig) {
@@ -32,12 +33,7 @@ public class RouteHop extends CommonBase {
                return ret;
        }
 
-       public void set_node_features(RouteHop this_ptr, NodeFeatures val) {
-               bindings.RouteHop_set_node_features(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
-               this.ptrs_to.add(this_ptr);
-               this.ptrs_to.add(val);
-       }
-
+       // Skipped RouteHop_set_node_features
        public long get_short_channel_id(RouteHop this_ptr) {
                long ret = bindings.RouteHop_get_short_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
@@ -55,12 +51,7 @@ public class RouteHop extends CommonBase {
                return ret;
        }
 
-       public void set_channel_features(RouteHop this_ptr, ChannelFeatures val) {
-               bindings.RouteHop_set_channel_features(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
-               this.ptrs_to.add(this_ptr);
-               this.ptrs_to.add(val);
-       }
-
+       // Skipped RouteHop_set_channel_features
        public long get_fee_msat(RouteHop this_ptr) {
                long ret = bindings.RouteHop_get_fee_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
@@ -83,10 +74,5 @@ public class RouteHop extends CommonBase {
                this.ptrs_to.add(this_ptr);
        }
 
-       public RouteHop(byte[] pubkey_arg, NodeFeatures node_features_arg, long short_channel_id_arg, ChannelFeatures channel_features_arg, long fee_msat_arg, int cltv_expiry_delta_arg) {
-               super(bindings.RouteHop_new(pubkey_arg, node_features_arg == null ? 0 : node_features_arg.ptr & ~1, short_channel_id_arg, channel_features_arg == null ? 0 : channel_features_arg.ptr & ~1, fee_msat_arg, cltv_expiry_delta_arg));
-               this.ptrs_to.add(node_features_arg);
-               this.ptrs_to.add(channel_features_arg);
-       }
-
+       // Skipped RouteHop_new
 }