- out_java += ("\t\t\tpublic " + field_ty.java_ty + " " + field_ty.arg_name + ";\n")
- java_hu_subclasses = java_hu_subclasses + "\t\tpublic final " + field_ty.java_hu_ty + " " + field_ty.arg_name + ";\n"
+ if idx > 0:
+ init_meth_params = init_meth_params + ", "
+
+ if field_ty.java_hu_ty == var.var_name:
+ field_path = field_ty.java_fn_ty_arg.strip("L;").replace("/", ".")
+ out_java += "\t\t\tpublic " + field_path + " " + field_ty.arg_name + ";\n"
+ java_hu_subclasses = java_hu_subclasses + "\t\tpublic final " + field_path + " " + field_ty.arg_name + ";\n"
+ init_meth_params = init_meth_params + field_path + " " + field_ty.arg_name
+ else:
+ out_java += "\t\t\tpublic " + field_ty.java_ty + " " + field_ty.arg_name + ";\n"
+ java_hu_subclasses = java_hu_subclasses + "\t\tpublic final " + field_ty.java_hu_ty + " " + field_ty.arg_name + ";\n"
+ init_meth_params = init_meth_params + field_ty.java_ty + " " + field_ty.arg_name
+ init_meth_body = init_meth_body + "this." + field_ty.arg_name + " = " + field_ty.arg_name + "; "