Object Teams and Android [message #870089] |
Sun, 06 May 2012 06:35  |
Eclipse User |
|
|
|
Hello gentleman. I've been familiar with OJ/T for a while now and although I am by no means an expert I must say I really enjoy using OJ/T, specially when implementing patterns.
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.
|
|
|
Re: Object Teams and Android [message #870099 is a reply to message #870089] |
Sun, 06 May 2012 09:01  |
Eclipse User |
|
|
|
Hi Pedro,
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!
best,
Stephan
|
|
|
Powered by
FUDForum. Page generated in 0.24599 seconds