Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsObject Teams and Android
https://www.eclipse.org/forums/index.php/mv/msg/351128/870089/#msg_870089
Recently, in my Android project, I've come across with some nifty patterns (visitor for instance) that could really benefit from OT/J. However I can't find information on how to implement OT/J in Android and I am not sure if this feature exists for now.
Is there any adaption for Android to use OT/J? If yes where can I find it? If no, will such an adaption ever exist?
Thanks in advance.]]>Pedro Martins2012-05-06T10:35:19-00:00Re: Object Teams and Android
https://www.eclipse.org/forums/index.php/mv/msg/351128/870099/#msg_870099
I'm not yet aware of anybody using OT/J on Android, and it won't work directly out of the box ATM, but making it work should only involve two basic steps:
(1) trigger bytecode weaving ahead of time (instead of at load-time)
(2) link with the minimal OT/J runtime library
Currently, dumping transformed bytecodes to disk is only used for debugging purposes: running any OT/J application with -Dot.dump=true writes transformed bytecodes into a directory "jplis_dump".
Using this for creating your APK from woven bytecodes should be pretty easy, actually. Things will get slightly more involved, when you want to weave into 3rd party jars, and thus have to repackage those.
As to the runtime library, you'll find a small "otre_min.jar" inside the plugin org.eclipse.objectteams.otdt, which should actually suffice for this purpose (no external dependencies!).
Why don't you open an enhancement request in bugzilla, where we can work out, how the .class transformation can be integrated in an Android build.
I think this would be pretty cool to have!