[java2perl6] r93 committed - Map java.math.BigDecimal to Num not Rat as Rat isn't available yet....

[email protected] Tue, 11 Aug 2009 14:13:46 +0000
Newsgroups perl.dbdi.dev
Message-ID <[email protected]>
Revision: 93
Author: tim.bunce
Date: Tue Aug 11 07:12:36 2009
Log: Map java.math.BigDecimal to Num not Rat as Rat isn't available yet.
Map java.sql.SQLInput & .SQLOutput to Object.
Raised trace level to logging the javap command call.

http://code.google.com/p/java2perl6/source/detail?r=93

Modified:
  /trunk/bin/java2perl6
  /trunk/lib/Java/Javap/TypeCast.pm

=======================================
--- /trunk/bin/java2perl6	Tue Aug 11 06:35:12 2009
+++ /trunk/bin/java2perl6	Tue Aug 11 07:12:36 2009
@@ -83,7 +83,7 @@
      return undef if our $process_java_class_tried->{$class}++;

      my $cmd = "javap $jpcmd $class";
-    warn "$cmd\n" if $opt_trace >= 2;
+    warn "$cmd\n" if $opt_trace >= 3;
      my $decomp = `$cmd`; # XXX check exit status
      warn $decomp if $opt_trace >= 3;
      my $tree   = $parser->comp_unit( $decomp )
=======================================
--- /trunk/lib/Java/Javap/TypeCast.pm	Tue Aug 11 06:35:12 2009
+++ /trunk/lib/Java/Javap/TypeCast.pm	Tue Aug 11 07:12:36 2009
@@ -20,7 +20,9 @@

      'java.math.BigInteger'  => 'Int',
      'java.math.BigNumber'   => 'Num',
-    'java.math.BigDecimal'  => 'Rat',
+    'java.math.BigDecimal'  => 'Num', # XXX should be Rat when available
+
+    'java.util.Map'         => 'Mapping',

      'java.net.URI'          => 'Str',
      'java.net.URL'          => 'Str',
@@ -34,6 +36,9 @@
      # java.security.Permission has recursive dependency with  
java.security.PermissionCollection
      'java.security.Permission'      => 'Object',
      'java.security.BasicPermission' => 'Object',
+    'java.sql.Array' => 'Object', # recursive-use with java::sql::ResultSet
+    'java.sql.SQLOutput' => 'Object',
+    'java.sql.SQLInput'  => 'Object',
  };

  sub set_type_casts {