Hi Raja, Sorry I didn't understand originally that you wanted source transformation, though I'm not sure exactly what you mean when you say that bytecode transformation wouldn't work for your context. As for the debug/source argument I would say that debugging Java 3 bytecode with Java 5 source should be perfectly feasible and arguably better than debugging Java 3 source as the annotations and generics may at least give some clue about intent. However...
If you wish to work with source you may find these projects interesting [1]. I have personal experience with the JBoss Forge java-parser project and it can probably be made to do what you want, although it won't be the most trivial of tasks. I have no idea about the antlrjavaparser project, but since it was also released relatively recently there's no harm in your looking there if you like. HTH, Matt [1] http://search.maven.org/#search%7Cga%7C1%7Cjava-parser On Sat, Aug 24, 2013 at 6:18 AM, Jan Matèrne (jhm) <apa...@materne.de>wrote: > Deleting all Annotations would be one part.**** > > Maybe this could be done with <filterchain>s and regexps.**** > > ** ** > > Not sure if this approach would help with removing the generics ...**** > > ** ** > > ** ** > > Jan**** > > ** ** > > *Von:* Raja Nagendra Kumar [mailto:nagendra.r...@tejasoft.com] > *Gesendet:* Samstag, 24. August 2013 12:18 > *An:* user@ant.apache.org > *Betreff:* Re: Annotations Stripping or Transformation at Build time**** > > ** ** > > Hi Matt, > > Thank You for the directions. Most the tools, which work in these > contrained devices, does not work on byte code. hence transformation the > source code is essential in my case. > Also, more essentially, source code helps in better debugging with break > points with IDE's. > > Any ant task which does source code transformation by eliminating all the > annotations and gives the rest of source code is what am looking to. > > Regards, > Nagendra**** > > *Raja Nagendra Kumar* > Founder & C.T.O **** > > **** > > *Mobile:* +91-9886723872**** > > *Email:* nagendra.r...@tejasoft.com > *IM:* nagendra.raja (Skype) > *http://in.linkedin.com/in/nagkumar***** > > *TejaSoft Innovations Pvt Ltd* > <http://www.tejasoft.com> > Factor 4 Results **** > > See who we know in > common<http://www.linkedin.com/e/wwk/5094208/?hs=false&tok=0bfzEZotG8slI1> > **** > > Want a signature like > this?<http://www.linkedin.com/e/sig/5094208/?hs=false&tok=0uLVu92uq8slI1> > **** > > > On 8/24/2013 10:53 AM, Matt Benson wrote: **** > > Interesting. There is a project in the Apache Commons sandbox, the > [weaver] component, which provides a general infrastructure for performing > bytecode transformations. An Ant task is provided. It might be fairly > trivial to rewrite 1.5 bytecode to v1.3; I'm not sure. **** > > Matt**** > > On Aug 23, 2013 10:11 PM, "Raja Nagendra Kumar" < > nagendra.r...@tejasoft.com> wrote:**** > > Hi, > > Is there any ant task, which allows manupulation of annotations with in > java source code.. > > The need I have is, I want to either strip all the annotations within the > java source code as java 1.3 (used for javame) does not support annotations > or use Simple xml parser for Android while on server side we can used jaxb. > We need to do this, without deplicating the same code at 3 places but with > one single source code but with build time manipulations. > > Regards, > Nagendra**** > > *Raja Nagendra Kumar* > Founder & C.T.O **** > > **** > > *Mobile:* +91-9886723872**** > > *Email:* nagendra.r...@tejasoft.com > *IM:* nagendra.raja (Skype) > *http://in.linkedin.com/in/nagkumar***** > > *TejaSoft Innovations Pvt Ltd* > <http://www.tejasoft.com> > Factor 4 Results **** > > See who we know in > common<http://www.linkedin.com/e/wwk/5094208/?hs=false&tok=0bfzEZotG8slI1> > **** > > Want a signature like > this?<http://www.linkedin.com/e/sig/5094208/?hs=false&tok=0uLVu92uq8slI1> > **** > > ** ** >