From 69cd40240d61a298992b208bae920888d3100ba0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexis=20Laferri=C3=A8re?= Date: Mon, 5 Jan 2015 19:19:06 -0500 Subject: [PATCH] contrib/jwrapper: default name of Java primitive arrays are Java?Array MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexis Laferrière --- contrib/jwrapper/src/types.nit | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/contrib/jwrapper/src/types.nit b/contrib/jwrapper/src/types.nit index efe1d01..53d95b7 100644 --- a/contrib/jwrapper/src/types.nit +++ b/contrib/jwrapper/src/types.nit @@ -93,15 +93,16 @@ class JavaType do if is_wrapped then return new NitType.with_module(find_extern_class.as(not null).first, find_extern_class.as(not null).second) - var name = "Native" + extern_class_name.join("") - var nit_type: NitType - if self.is_primitive_array then - nit_type = new NitType.with_generic_params("Array", name) + var name + if is_primitive_array then + # Primitive arrays have a special naming convention + name = "Native" + extern_class_name.join("").capitalized + "Array" else - nit_type = new NitType("Native" + extern_class_name.join("")) + name = "Native" + extern_class_name.join("") end - nit_type.is_complete = false + var nit_type = new NitType(name) + nit_type.is_complete = false return nit_type end -- 1.7.9.5