import org.ldk.enums.*;
import org.ldk.util.*;
import java.util.Arrays;
+import java.lang.ref.Reference;
import javax.annotation.Nullable;
/**
* A human-readable error message
*/
- public final String err;
+ public final java.lang.String err;
private APIMisuseError(long ptr, bindings.LDKAPIError.APIMisuseError obj) {
super(null, ptr);
this.err = obj.err;
/**
* A human-readable error message
*/
- public final String err;
+ public final java.lang.String err;
/**
* The feerate which was too high.
*/
/**
* A human-readable error message
*/
- public final String err;
+ public final java.lang.String err;
private RouteError(long ptr, bindings.LDKAPIError.RouteError obj) {
super(null, ptr);
this.err = obj.err;
/**
* A human-readable error message
*/
- public final String err;
+ public final java.lang.String err;
private ChannelUnavailable(long ptr, bindings.LDKAPIError.ChannelUnavailable obj) {
super(null, ptr);
this.err = obj.err;
/**
* The incompatible shutdown script.
*/
- public final ShutdownScript script;
+ public final org.ldk.structs.ShutdownScript script;
private IncompatibleShutdownScript(long ptr, bindings.LDKAPIError.IncompatibleShutdownScript obj) {
super(null, ptr);
long script = obj.script;
}
long clone_ptr() {
long ret = bindings.APIError_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
return ret;
}
*/
public APIError clone() {
long ret = bindings.APIError_clone(this.ptr);
+ Reference.reachabilityFence(this);
if (ret >= 0 && ret <= 4096) { return null; }
- APIError ret_hu_conv = APIError.constr_from_ptr(ret);
+ org.ldk.structs.APIError ret_hu_conv = org.ldk.structs.APIError.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(this);
return ret_hu_conv;
}
*/
public static APIError apimisuse_error(java.lang.String err) {
long ret = bindings.APIError_apimisuse_error(err);
+ Reference.reachabilityFence(err);
if (ret >= 0 && ret <= 4096) { return null; }
- APIError ret_hu_conv = APIError.constr_from_ptr(ret);
+ org.ldk.structs.APIError ret_hu_conv = org.ldk.structs.APIError.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(ret_hu_conv);
return ret_hu_conv;
}
*/
public static APIError fee_rate_too_high(java.lang.String err, int feerate) {
long ret = bindings.APIError_fee_rate_too_high(err, feerate);
+ Reference.reachabilityFence(err);
+ Reference.reachabilityFence(feerate);
if (ret >= 0 && ret <= 4096) { return null; }
- APIError ret_hu_conv = APIError.constr_from_ptr(ret);
+ org.ldk.structs.APIError ret_hu_conv = org.ldk.structs.APIError.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(ret_hu_conv);
return ret_hu_conv;
}
*/
public static APIError route_error(java.lang.String err) {
long ret = bindings.APIError_route_error(err);
+ Reference.reachabilityFence(err);
if (ret >= 0 && ret <= 4096) { return null; }
- APIError ret_hu_conv = APIError.constr_from_ptr(ret);
+ org.ldk.structs.APIError ret_hu_conv = org.ldk.structs.APIError.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(ret_hu_conv);
return ret_hu_conv;
}
*/
public static APIError channel_unavailable(java.lang.String err) {
long ret = bindings.APIError_channel_unavailable(err);
+ Reference.reachabilityFence(err);
if (ret >= 0 && ret <= 4096) { return null; }
- APIError ret_hu_conv = APIError.constr_from_ptr(ret);
+ org.ldk.structs.APIError ret_hu_conv = org.ldk.structs.APIError.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(ret_hu_conv);
return ret_hu_conv;
}
public static APIError monitor_update_failed() {
long ret = bindings.APIError_monitor_update_failed();
if (ret >= 0 && ret <= 4096) { return null; }
- APIError ret_hu_conv = APIError.constr_from_ptr(ret);
+ org.ldk.structs.APIError ret_hu_conv = org.ldk.structs.APIError.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(ret_hu_conv);
return ret_hu_conv;
}
*/
public static APIError incompatible_shutdown_script(ShutdownScript script) {
long ret = bindings.APIError_incompatible_shutdown_script(script == null ? 0 : script.ptr & ~1);
+ Reference.reachabilityFence(script);
if (ret >= 0 && ret <= 4096) { return null; }
- APIError ret_hu_conv = APIError.constr_from_ptr(ret);
+ org.ldk.structs.APIError ret_hu_conv = org.ldk.structs.APIError.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(ret_hu_conv);
return ret_hu_conv;
}