Research Article
Hybrid PolyLingual Object Model: An Efficient and Seamless Integration of Java and Native Components on the Dalvik Virtual Machine
Algorithm 2
Definitions of HPO classes.
FooBar.java | package com.elastos.hpo.foobar; | import dalvik.annotation.CAR; | @HPOClass(Module = “FooBar”, Class = “CFooBar”) | Class FooBar{ | private String strField = “Hello”; | native int Foo(int a, int b); | native String Bar();} | IFoo.java | package com.elastos.hpo.foobar; | import dalvik.annotation.CAR; | @HPOInterface(Module = “FooBar”, Interface = “IFoo”) | class IFoo{ | native int Foo(int a, int b);} | IBar.java | package com.elastos.hpo.foobar; | import dalvik.annotation.CAR; | @HPOInterface(Module = “FooBar”, Interface = “IBar”) | class IBar{ | native String Bar();} |
|