ffi/java: support inner classes and JNI format in extern Java types
authorAlexis Laferrière <alexis.laf@xymus.net>
Wed, 14 May 2014 15:41:29 +0000 (11:41 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Wed, 14 May 2014 15:41:56 +0000 (11:41 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

src/common_ffi/java.nit

index 5086beb..a03f67d 100644 (file)
@@ -462,7 +462,8 @@ redef class MClassType
        redef fun java_type
        do
                var ftype = mclass.ftype
-               if ftype isa ForeignJavaType then return ftype.java_type
+               if ftype isa ForeignJavaType then return ftype.java_type.
+                       replace('/', ".").replace('$', ".").replace(' ', "")
                if mclass.name == "Bool" then return "boolean"
                if mclass.name == "Char" then return "char"
                if mclass.name == "Int" then return "int"