Page 1 of 1

[Solved] [Java]How do I know what interfaces supported?

Posted: Wed Mar 25, 2009 2:48 am
by hawkx
We know, we can get supported interface from object using UnoRuntime.QueryInterface, and usually more than one interface supported by an object, for instance:

XComponent xSpreadsheetComponent = xComponentLoader.loadComponentFromURL(
"private:factory/scalc", "_blank", 0, loadProps);
//Get XSpreadsheetDocument interface
XSpreadsheetDocument xSpreadsheetDocument = (XSpreadsheetDocument)UnoRuntime.queryInterface(
XSpreadsheetDocument.class, xSpreadsheetComponent);
//Get XModel interface
XModel xModel = (XModel) UnoRuntime.queryInterface(XModel.class, xSpreadsheetComponent);

The question is: How much interfaces supported by an object, what interfaces, how do I know?

Thanks for your help!

Re: [Java] How do I know what interfaces supported by my object?

Posted: Wed Mar 25, 2009 5:01 am
by FJCC
I'm not a Java user, so perhaps I don't understand your question correctly. There are a couple of Object inspection tools that I find are extremely useful when working on macros: MRI and XRay. They are very similar in their utility. I took a quick look at the documentation and they both seem to work with Java. If you download the SDK, these tools will also access the documentation for selected interfaces, methods etc.

Re: [Java] How do I know what interfaces supported by my object?

Posted: Wed Mar 25, 2009 10:00 pm
by hol.sten

Re: [Java] How do I know what interfaces supported by my object?

Posted: Fri Mar 27, 2009 5:47 am
by hawkx
hol.sten wrote:Try this: Using Xray from Java: http://www.oooforum.org/forum/viewtopic ... light=xray
Yes, I got it. Thanks so much!

Re: [Java] How do I know what interfaces supported by my object?

Posted: Fri Mar 27, 2009 1:26 pm
by TheGurkha
If this has answered your question please go to your first post and use the Edit button, and add [Solved] to the start of the title. You can use the green tick icon at the same time if you like.