This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
add <init> method to java interface
- From: Yaroslav Kavenchuk <kavenchuk at gmail dot com>
- To: kawa at sourceware dot org
- Date: Tue, 11 Dec 2007 17:48:23 +0200
- Subject: add <init> method to java interface
How can I add <init> (or valueOf - which of them?) method to java interface?
Example (use OpenOffice Java UNO):
(define-namespace Bootstrap com.sun.star.comp.helper.Bootstrap)
(define-namespace UnoRuntime com.sun.star.uno.UnoRuntime)
(define-namespace XComponentLoader com.sun.star.frame.XComponentLoader)
(define xRemoteContext (Bootstrap:bootstrap))
(define xRemoteServiceManager (xRemoteContext:getServiceManager))
(define desktop (xRemoteServiceManager:createInstanceWithContext
"com.sun.star.frame.Desktop" xRemoteContext))
(define xComponentLoader (UnoRuntime:queryInterface XComponentLoader
desktop))
...
Method `UnoRuntime:queryInterface` is used very much often.
declaration of UnoRuntime.queryInterface:
public static Object queryInterface(Type type, Object object)
where 'type' is usually the interface - successor of
com.sun.star.uno.XInterface
I want to write simply:
(XComponentLoader desktop)
It is possible?
Thanks!
--
WBR, Yaroslav Kavenchuk.