This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]