river-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Firmstone <j...@zeus.net.au>
Subject Retrotranslator generates Java 1.4 bytecode from Java 1.5 sources - Clarification
Date Sat, 28 Mar 2009 12:29:58 GMT
Thank you all for the comments,

Just thought I'd make a note that I've finished backporting the 
classdepend code that Tim provided to 1.4, still playing around with it, 
I'll post it shortly.  Just so everyone is clear that Java 1.5 is not 
required for this particular task.

However while doing the backport I removed all Generics and replaced 
them with unchecked class casts, which motivated me to consider the 
benefits of Java 1.5 language constructs, mostly since of the use of 
Generics allows additional checking by the compiler which has the 
potential to reduce runtime errors.  This also led me to ponder the 
Backported Concurrency utilities and Annotations.

Considering that the ClassDep code has now added a new library 
dependency ASM (3.2MB source), I thought that we could also consider 
using Retrotranslator (3.1MB source) in our ant build scripts to build 
Java 1.4 compatible bytecode while getting to take advantage of most 
Java 1.5 language features.

Comments so far have been

Item
	For
Drop Java 1.4 support altogether, migrate to 1.5 allowing us to write 
new code in Java 1.5, this negates the need for Retrotranslator
	Dennis Reedy, Jim Waldo, Jonathan Costers, Greg Trasuk
Consider small device VM's ( JavaME CDC incl class loading) this 
requires supporting JRE 1.4,  discuss further, do some research into the 
size of bytecode generated by Retrotranslator.
	Patrick Wright, Peter Firmstone
If a device is too small to use post 1.4 features use surrogate 
instead.  I think combined with the point above, we'd need to state the 
minimum device requirements for full jini architecture support.
	Sean Landis, Peter Firmstone
More consideration required before migrating away from 1.4 platform support.
	Tim Blackman


What I'm proposing is a Transition Period, using Retrotranslator in our 
build scripts to support Java 1.4 bytecode  while allowing us to use 1.5 
language constructs.

Best Regards,

Peter Firmstone.

What Java 5.0 features are supported:

    * Generics
    * Annotations
    * Reflection on generics and annotations
    * Typesafe enums
    * Autoboxing/unboxing
    * Enhanced for loop
    * Varargs
    * Covariant return types
    * Formatted output
    * Static import
    * Concurrency utilities
    * Collections framework enhancements



For those interested this is Retrotranslator's source directory / 
package structure, its surprisingly small:

bash-3.00$ du -h ./
   4K   ./conf/retrotranslator-runtime
   4K   ./conf/retrotranslator-runtime13
   5K   ./conf/retrotranslator-transformer
  14K   ./conf
  68K   ./doc
 818K   ./lib
   1K   ./src/net/sf/retrotranslator/android/extra/java
   2K   ./src/net/sf/retrotranslator/android/extra
   3K   ./src/net/sf/retrotranslator/android
  18K   ./src/net/sf/retrotranslator/registry
   6K   ./src/net/sf/retrotranslator/runtime/asm/commons
  25K   ./src/net/sf/retrotranslator/runtime/asm/signature
 359K   ./src/net/sf/retrotranslator/runtime/asm
  65K   ./src/net/sf/retrotranslator/runtime/format
 127K   ./src/net/sf/retrotranslator/runtime/impl
  34K   ./src/net/sf/retrotranslator/runtime/java/io
  26K   ./src/net/sf/retrotranslator/runtime/java/lang/annotation
  16K   ./src/net/sf/retrotranslator/runtime/java/lang/instrument
   4K   ./src/net/sf/retrotranslator/runtime/java/lang/management
  57K   ./src/net/sf/retrotranslator/runtime/java/lang/reflect
 246K   ./src/net/sf/retrotranslator/runtime/java/lang
  11K   ./src/net/sf/retrotranslator/runtime/java/math
  18K   ./src/net/sf/retrotranslator/runtime/java/net
   4K   ./src/net/sf/retrotranslator/runtime/java/nio/charset
   8K   ./src/net/sf/retrotranslator/runtime/java/nio
   7K   ./src/net/sf/retrotranslator/runtime/java/rmi/server
   8K   ./src/net/sf/retrotranslator/runtime/java/rmi
  12K   ./src/net/sf/retrotranslator/runtime/java/text
   6K   ./src/net/sf/retrotranslator/runtime/java/util/concurrent/locks
   7K   ./src/net/sf/retrotranslator/runtime/java/util/concurrent
  18K   ./src/net/sf/retrotranslator/runtime/java/util/regex
 144K   ./src/net/sf/retrotranslator/runtime/java/util
 482K   ./src/net/sf/retrotranslator/runtime/java
   4K   ./src/net/sf/retrotranslator/runtime/javax/net/ssl
   5K   ./src/net/sf/retrotranslator/runtime/javax/net
   6K   ./src/net/sf/retrotranslator/runtime/javax
 1.0M   ./src/net/sf/retrotranslator/runtime
  28K   ./src/net/sf/retrotranslator/runtime13/v14/java/lang
   4K   ./src/net/sf/retrotranslator/runtime13/v14/java/util
  33K   ./src/net/sf/retrotranslator/runtime13/v14/java
  34K   ./src/net/sf/retrotranslator/runtime13/v14
  35K   ./src/net/sf/retrotranslator/runtime13
 378K   ./src/net/sf/retrotranslator/transformer
 1.4M   ./src/net/sf/retrotranslator
 1.4M   ./src/net/sf
 1.4M   ./src/net
 1.4M   ./src
  55K   ./test/net/sf/retrotranslator/runtime/format
  12K   ./test/net/sf/retrotranslator/runtime/impl
  31K   ./test/net/sf/retrotranslator/runtime/java/io
  17K   ./test/net/sf/retrotranslator/runtime/java/lang/instrument
   4K   ./test/net/sf/retrotranslator/runtime/java/lang/management
  61K   ./test/net/sf/retrotranslator/runtime/java/lang/reflect
 275K   ./test/net/sf/retrotranslator/runtime/java/lang
  15K   ./test/net/sf/retrotranslator/runtime/java/math
  32K   ./test/net/sf/retrotranslator/runtime/java/net
   4K   ./test/net/sf/retrotranslator/runtime/java/nio/charset
   9K   ./test/net/sf/retrotranslator/runtime/java/nio
  12K   ./test/net/sf/retrotranslator/runtime/java/rmi/server
  13K   ./test/net/sf/retrotranslator/runtime/java/rmi
   7K   ./test/net/sf/retrotranslator/runtime/java/text
   6K   ./test/net/sf/retrotranslator/runtime/java/util/concurrent/locks
   7K   ./test/net/sf/retrotranslator/runtime/java/util/concurrent
  14K   ./test/net/sf/retrotranslator/runtime/java/util/regex
 128K   ./test/net/sf/retrotranslator/runtime/java/util
 511K   ./test/net/sf/retrotranslator/runtime/java
   8K   ./test/net/sf/retrotranslator/runtime/javax/net/ssl
   9K   ./test/net/sf/retrotranslator/runtime/javax/net
  10K   ./test/net/sf/retrotranslator/runtime/javax
 589K   ./test/net/sf/retrotranslator/runtime
  25K   ./test/net/sf/retrotranslator/runtime13/v14/java/lang
   4K   ./test/net/sf/retrotranslator/runtime13/v14/java/util
  30K   ./test/net/sf/retrotranslator/runtime13/v14/java
  31K   ./test/net/sf/retrotranslator/runtime13/v14
  32K   ./test/net/sf/retrotranslator/runtime13
   6K   ./test/net/sf/retrotranslator/tests/custom
   4K   ./test/net/sf/retrotranslator/tests/java/math
   6K   ./test/net/sf/retrotranslator/tests/java/util
  11K   ./test/net/sf/retrotranslator/tests/java
  79K   ./test/net/sf/retrotranslator/tests
  15K   ./test/net/sf/retrotranslator/transformer/smart
  90K   ./test/net/sf/retrotranslator/transformer
 791K   ./test/net/sf/retrotranslator
 792K   ./test/net/sf
 793K   ./test/net
 794K   ./test
 3.1M   .


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message