Unify tuple and result field getters and push them through map_fn
[ldk-java] / java_strings.py
index 78bd10a0a9b151196c24323ca569cebc3ee24cec..ccde06e5806d73edabb5d19d7fe9115b3090b3ef 100644 (file)
@@ -1210,7 +1210,7 @@ import javax.annotation.Nullable;
                     out_java_struct += "\tpublic static " + return_type_info.java_hu_ty + " with_default("
                 else:
                     out_java_struct += "\tpublic static " + return_type_info.java_hu_ty + " " + meth_n + "("
-            elif meth_n == "clone_ptr":
+            elif meth_n == "clone_ptr" or (struct_meth.startswith("LDKCResult") and (meth_n == "get_ok" or meth_n == "get_err")):
                 out_java_struct += ("\t" + return_type_info.java_hu_ty + " " + meth_n + "(")
             else:
                 if meth_n == "hash" and return_type_info.java_hu_ty == "long":