1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
7 import java.lang.ref.Reference;
8 import javax.annotation.Nullable;
12 * A Record, unit of logging output with Metadata to enable filtering
13 * Module_path, file, line to inform on log's source
15 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
16 public class Record extends CommonBase {
17 Record(Object _dummy, long ptr) { super(ptr); }
18 @Override @SuppressWarnings("deprecation")
19 protected void finalize() throws Throwable {
21 if (ptr != 0) { bindings.Record_free(ptr); }
25 * The verbosity level of the message.
27 public Level get_level() {
28 Level ret = bindings.Record_get_level(this.ptr);
29 Reference.reachabilityFence(this);
34 * The verbosity level of the message.
36 public void set_level(org.ldk.enums.Level val) {
37 bindings.Record_set_level(this.ptr, val);
38 Reference.reachabilityFence(this);
39 Reference.reachabilityFence(val);
45 public String get_args() {
46 String ret = bindings.Record_get_args(this.ptr);
47 Reference.reachabilityFence(this);
54 public void set_args(java.lang.String val) {
55 bindings.Record_set_args(this.ptr, val);
56 Reference.reachabilityFence(this);
57 Reference.reachabilityFence(val);
61 * The module path of the message.
63 public String get_module_path() {
64 String ret = bindings.Record_get_module_path(this.ptr);
65 Reference.reachabilityFence(this);
70 * The module path of the message.
72 public void set_module_path(java.lang.String val) {
73 bindings.Record_set_module_path(this.ptr, val);
74 Reference.reachabilityFence(this);
75 Reference.reachabilityFence(val);
79 * The source file containing the message.
81 public String get_file() {
82 String ret = bindings.Record_get_file(this.ptr);
83 Reference.reachabilityFence(this);
88 * The source file containing the message.
90 public void set_file(java.lang.String val) {
91 bindings.Record_set_file(this.ptr, val);
92 Reference.reachabilityFence(this);
93 Reference.reachabilityFence(val);
97 * The line containing the message.
99 public int get_line() {
100 int ret = bindings.Record_get_line(this.ptr);
101 Reference.reachabilityFence(this);
106 * The line containing the message.
108 public void set_line(int val) {
109 bindings.Record_set_line(this.ptr, val);
110 Reference.reachabilityFence(this);
111 Reference.reachabilityFence(val);
115 long ret = bindings.Record_clone_ptr(this.ptr);
116 Reference.reachabilityFence(this);
121 * Creates a copy of the Record
123 public Record clone() {
124 long ret = bindings.Record_clone(this.ptr);
125 Reference.reachabilityFence(this);
126 if (ret >= 0 && ret <= 4096) { return null; }
127 org.ldk.structs.Record ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Record(null, ret); }
128 ret_hu_conv.ptrs_to.add(this);