+ def constr_hu_array(self, ty_info, arr_len):
+ base_ty = ty_info.subty.java_hu_ty.split("[")[0].split("<")[0]
+ conv = "new " + base_ty + "[" + arr_len + "]"
+ if "[" in ty_info.subty.java_hu_ty.split("<")[0]:
+ # Do a bit of a dance to move any excess [] to the end
+ conv += "[" + ty_info.subty.java_hu_ty.split("<")[0].split("[")[1]
+ return conv
+
+ def for_n_in_range(self, n, minimum, maximum):
+ return "for (int " + n + " = " + minimum + "; " + n + " < " + maximum + "; " + n + "++) {"
+ def for_n_in_arr(self, n, arr_name, arr_elem_ty):
+ return ("for (" + arr_elem_ty.java_hu_ty + " " + n + ": " + arr_name + ") { ", " }")
+
+ def get_ptr(self, var):
+ return var + ".ptr"
+ def set_null_skip_free(self, var):
+ return var + ".ptr" + " = 0;"
+