if (raw_val.getClass() == bindings.LDKClosureReason.CounterpartyCoopClosedUnfundedChannel.class) {
return new CounterpartyCoopClosedUnfundedChannel(ptr, (bindings.LDKClosureReason.CounterpartyCoopClosedUnfundedChannel)raw_val);
}
+ if (raw_val.getClass() == bindings.LDKClosureReason.FundingBatchClosure.class) {
+ return new FundingBatchClosure(ptr, (bindings.LDKClosureReason.FundingBatchClosure)raw_val);
+ }
assert false; return null; // Unreachable without extending the (internal) bindings interface
}
super(null, ptr);
}
}
+ /**
+ * Another channel in the same funding batch closed before the funding transaction
+ * was ready to be broadcast.
+ */
+ public final static class FundingBatchClosure extends ClosureReason {
+ private FundingBatchClosure(long ptr, bindings.LDKClosureReason.FundingBatchClosure obj) {
+ super(null, ptr);
+ }
+ }
long clone_ptr() {
long ret = bindings.ClosureReason_clone_ptr(this.ptr);
Reference.reachabilityFence(this);
return ret_hu_conv;
}
+ /**
+ * Utility method to constructs a new FundingBatchClosure-variant ClosureReason
+ */
+ public static ClosureReason funding_batch_closure() {
+ long ret = bindings.ClosureReason_funding_batch_closure();
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ClosureReason ret_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
/**
* Checks if two ClosureReasons contain equal inner contents.
* This ignores pointers and is_owned flags and looks at the values in fields.