王在祥 wrote:
I am a beginner of OpenOffice and I am learning the SDK document now.

Instead, i found the mapping from IDL to java looks missing something:

The Java UNO language binding predates Java 5 by some years. That might explain why some of its features look strange or less than optimal in a Java 5 context. Also, we try hard to keep the Java UNO language binding and Java UNO environment compatible with Java 1.3.

1. the mapped Java classes contains less information than the IDL, By using the Java 5 annotations will solve this problem, and we can even write no IDL at all, and simply writing the Java classes, and using a tool to generate the IDL if neccessary.

Only little information is missing (e.g., typedefs), most information is preserved in the form of com.sun.star.lib.uno.typeinfo.TypeInfo arrays. That information should suffice to write such a tool, if you like.

2. the Out/In Out parameter mapping is something strange. I think using a OutHolder<T> or InOutHolder<T> will be more clear

For Java 1.4 and earlier, using arrays is more type safe (though clumsier) than using some (type-erased) Holder<T>.

3. No Service is mapped, this require the queryInterface called frequently. I think a Service can be mapped to an interface which may extends other interface or aggregate optional interface inside.

New-style services do something very similar.

And more, i think there should be a util to generate the POJO mapping from exists IDL(Its better to include the documents in Java).

Sorry, no idea what that sentence should mean.

-Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to