The C++ API is pretty dynamic : one can create at runtime an Interface and add methods, signals and properties to it. It is also possible in C++ to call a method on an Interface that you don't know at runtime.
The java binding on the other hand, is really static : you need to define the Interfaces you are going to use during development, with appropriate annotations, to be able to call methods on it. Also you cannot create a new interface at run-time. As pointed , the annotation approach a some major advantages and is very conveninent in most cases.
However, I feel this approach is not always suitable :
- in some environment, reflexion is not authorized (HGI - OSGI, for example)
- sometimes, you really need dynamicity
Is there any rationnal behind this design ? is that a deliberate choic or just something that is not implemented yet ?
I was looking at the code in
InterfaceDescription.java as a starting point to implement such dynamicity, could you point me to some jni-binding issues I may encounter and that would make this more difficult than I thought it would be ?