Re: [tcljava-user] Java Keyword - "this".
Brought to you by:
mdejong
From: D.J.Hagberg <dha...@mi...> - 2005-10-28 03:44:32
|
Patrick, I'm not sure if I'm permitted to reply to your message, based on the nasty notice at the bottom of your email but here goes -- Well, there is no straight equivalent, since the Jacl code isn't really a Java object. You would need to pass in some /other/ Java object that implements the required interface -- in your case an instance of NotificationListener. I don't believe that Jacl has the capabilities that some other JVM scripting languages (Rhino, Jython, and Groovy come to mind) for the script to implement a particular interface. Perhaps I stand to be corrected? You may be able to extend the interpreter to provide a facility like this using JDK 1.3+'s dynamic proxy support, unless someone's done this already. -=- D. J. On Oct 27, 2005, at 9:22 PM, <PFi...@hb...> wrote: > How do I code the java keyword "this" in JACL? > > JAVA Code. > > adminClient.addNotificationListener(nodeAgent, this, null, null); > > JACL Code. > > $AdminClientI addNotificationListener $nodeAgent this $nullI $nullI > > error in procedure java::call: > "this" is not an object handle of class > "javax.management.NotificationListener" > > I use java::null to get a handle to the null Java reference. Is there > something similar for the "this" keyword or a work around? > > Regards. > > Patrick. > > =================================================== > HBF Health Funds Inc. a registered organisation under the National > Health Act > HBF Insurance Pty Ltd ACN 009 268 277 > This email is a confidential communication intended only for the named > Addressee(s). > If you are not that person any disclosure, copying, distribution or > use of this email > or the information in it is prohibited. Please notify us immediately by > telephone, (+61) 08 9265 6111 or return email and delete this email. > The views in this email may be personal to the author and not those of > HBF. |