Its Ant or command line task uses a bytecode scanner to detect Java 5 features and either replace them with their pre-Java 5 equivilent (StringBuilder -> StringBuffer) or a third party library (Doug Lea's Concurrency library). In the more extreme cases such as annotations, to be honest, I'm not sure exactly how it works, only that it does and Stripes is proof of that.
FWIW, Java 5 has had a big impact on Struts 2 development that we feel justifies the jump: * Cleaner API's with var args and generics * Annotations where externalized XML isn't necessary * Rich concurrency classes * Solid XML support w/o lib/endorsed * Type-safe enums to minimize unimplemented interfaces Each of the features can be implemented in other ways, but taken as a whole, they make your framework easier to use, understand, and support. Don On 8/14/06, Joerg Heinicke <[EMAIL PROTECTED]> wrote:
On 11.08.2006 20:41, Don Brown wrote: > Actually, you'd be surprised to what Retroweaver/Retrotranslator can > handle. Stripes, a Java 5 annotation-heavy web framework recently > used it to allow Java 1.4 apps to use Stripes, despite using new Java > 5 methods, annotations, and other features quite heavily. We (Struts) > are planning on using Retrotranslator to support Java 1.4, while > taking full advantage of Java 5 annotations and new class methods. It can handle changes in the APIs like https://svn.apache.org/viewvc?view=rev&revision=422219 (Java 1.3 vs. 1.4)? Or maybe even JDBC 3.0 vs JDBC 2.0? How is it doing it? Jörg