Search code examples
javaxmlandroidbytecodejibx

JiBX on Android (or any other build-time bytecode manipulating library)


I'm considering the use of JiBX for a project that will have to run on both Blackberry and RIM. While it seems like J2ME use of JiBX has been considered by the community (as per JiBX jira tickets), Android is relatively new.

The question is, therefore, this: has anybody had any success (or issues, for that matter) using JiBX on Android, or any other libraries that need to modify your class bytecode at build-time?

There have been discussions out there about how such libs should be runnable on Android (as compared to those using runtime bytecode instrumentation), but I haven't seen too many reports about people actually attempting to do this.


Solution

  • Ok, so I've decided to just write xml parsing code on top of XMLPull api, without any fancy tricks.

    If my schemas get any more complicated than they currently are (and I have time) I'd love to experiment with writing an ANTLR-based XML parser generator to generate actual Java code of the parsers for individual schemas.

    At the moment, afaik, java generation for mobile is much safer and better than bytecode-generation for mobile.