- elif ma.group(1).strip().startswith("LDKC2Tuple"):
- c_ty = consts.ptr_c_ty
- java_ty = consts.ptr_native_ty
- java_hu_ty = "TwoTuple<"
- if not ma.group(1).strip() in tuple_types:
- assert java_c_types_none_allowed
- return None
- for idx, ty_info in enumerate(tuple_types[ma.group(1).strip()][0]):
- if idx != 0:
- java_hu_ty = java_hu_ty + ", "
- if ty_info.is_native_primitive:
- if ty_info.java_hu_ty == "int":
- java_hu_ty = java_hu_ty + "Integer" # Java concrete integer type is Integer, not Int
- else:
- java_hu_ty = java_hu_ty + ty_info.java_hu_ty.title() # If we're a primitive, capitalize the first letter
- else:
- java_hu_ty = java_hu_ty + ty_info.java_hu_ty
- java_hu_ty = java_hu_ty + ">"
- fn_ty_arg = "J"
- fn_arg = ma.group(2).strip()
- rust_obj = ma.group(1).strip()
- take_by_ptr = True
- elif ma.group(1).strip().startswith("LDKC3Tuple"):
- c_ty = consts.ptr_c_ty
- java_ty = consts.ptr_native_ty
- java_hu_ty = "ThreeTuple<"
- if not ma.group(1).strip() in tuple_types:
- assert java_c_types_none_allowed
- return None
- for idx, ty_info in enumerate(tuple_types[ma.group(1).strip()][0]):
- if idx != 0:
- java_hu_ty = java_hu_ty + ", "
- if ty_info.is_native_primitive:
- if ty_info.java_hu_ty == "int":
- java_hu_ty = java_hu_ty + "Integer" # Java concrete integer type is Integer, not Int
- else:
- java_hu_ty = java_hu_ty + ty_info.java_hu_ty.title() # If we're a primitive, capitalize the first letter
- else:
- java_hu_ty = java_hu_ty + ty_info.java_hu_ty
- java_hu_ty = java_hu_ty + ">"
- fn_ty_arg = "J"
- fn_arg = ma.group(2).strip()
- rust_obj = ma.group(1).strip()
- take_by_ptr = True