contrib/jwrapper: print unsupported types in verbose mode
authorAlexis Laferrière <alexis.laf@xymus.net>
Tue, 28 Jul 2015 15:59:37 +0000 (11:59 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Wed, 29 Jul 2015 19:08:57 +0000 (15:08 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

contrib/jwrapper/src/jwrapper.nit
contrib/jwrapper/src/model.nit

index b6d8123..06e8f44 100644 (file)
@@ -203,4 +203,15 @@ sys.perfs["code generator"].add clock.lapse
 if opt_verbose.value > 1 then
        print "# Performance Analysis:"
        print sys.perfs
+
+       print "# {model.unknown_types.length} unknown types:"
+       var c = 0
+       for id, ntype in model.unknown_types do
+               print "* {id}"
+               c += 1
+               if c > 100 then
+                       print "* ..."
+                       break
+               end
+       end
 end
index c9d0af6..5864472 100644 (file)
@@ -196,10 +196,10 @@ class JavaModel
        end
 
        # Unknown types, not already wrapped and not in this pass
-       private var unknown_types = new HashMap[JavaType, NitType]
+       var unknown_types = new HashMap[JavaType, NitType]
 
        # Wrapped types, or classes analyzed in this pass
-       private var known_types = new HashMap[JavaType, NitType]
+       var known_types = new HashMap[JavaType, NitType]
 
        # Get the `NitType` corresponding to the `JavaType`
        #