1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
8 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
9 public class Init extends CommonBase {
10 Init(Object _dummy, long ptr) { super(ptr); }
11 @Override @SuppressWarnings("deprecation")
12 protected void finalize() throws Throwable {
14 if (ptr != 0) { bindings.Init_free(ptr); }
17 public InitFeatures get_features() {
18 long ret = bindings.Init_get_features(this.ptr);
19 InitFeatures ret_hu_conv = new InitFeatures(null, ret);
20 ret_hu_conv.ptrs_to.add(this);
24 public void set_features(InitFeatures val) {
25 bindings.Init_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
26 this.ptrs_to.add(val);
29 public static Init constructor_new(InitFeatures features_arg) {
30 long ret = bindings.Init_new(features_arg == null ? 0 : features_arg.ptr & ~1);
31 Init ret_hu_conv = new Init(null, ret);
32 ret_hu_conv.ptrs_to.add(ret_hu_conv);
33 ret_hu_conv.ptrs_to.add(features_arg);
38 long ret = bindings.Init_clone(this.ptr);
39 Init ret_hu_conv = new Init(null, ret);
40 ret_hu_conv.ptrs_to.add(this);
44 public byte[] write() {
45 byte[] ret = bindings.Init_write(this.ptr);
49 public static Result_InitDecodeErrorZ constructor_read(byte[] ser) {
50 long ret = bindings.Init_read(ser);
51 Result_InitDecodeErrorZ ret_hu_conv = Result_InitDecodeErrorZ.constr_from_ptr(ret);