Make the call for `ptrs_to.add()` swappable per language
[ldk-java] / java_strings.py
index ccde06e5806d73edabb5d19d7fe9115b3090b3ef..dbd05d56940452c53ff8cbb59796270bc5fc08c4 100644 (file)
@@ -617,6 +617,12 @@ import javax.annotation.Nullable;
         res = res + "}\n"
         return res
 
+    def var_decl_statement(self, ty_string, var_name, statement):
+        return ty_string + " " + var_name + " = " + statement
+
+    def add_ref(self, holder, referent):
+        return holder + ".ptrs_to.add(" + referent + ")"
+
     def native_c_unitary_enum_map(self, struct_name, variants, enum_doc_comment):
         out_java_enum = "package org.ldk.enums;\n\n"
         out_java = ""
@@ -1384,3 +1390,6 @@ import javax.annotation.Nullable;
             out_java_struct += ("\t}\n\n")
 
         return (out_java, out_c, out_java_struct + extra_java_struct_out)
+
+    def cleanup(self):
+        pass