This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: instance?
- From: Per Bothner <per at bothner dot com>
- To: Chris Dean <ctdean at sokitomi dot com>
- Cc: Kawa List <kawa at sources dot redhat dot com>
- Date: Sat, 21 Feb 2004 23:59:10 -0800
- Subject: Re: instance?
- References: <30499.1077430458@mercedsystems.com>
Chris Dean wrote:
I'd like to implement an alternate to `instance?' by creating a `?'
method in a define-namespace alias. That is:
(define-namespace date "class:java.util.Date")
(date:? (date:new)) ==> #t
(date:? "hello") ==> #f
Hm. That is a bit of a hack. Note sure whether I like it or not.
It's an interesting idea.
I'm having some trouble finding where to add this code. Can you point
me to where 'new' method name is implemented in the Java code?
It's in rewriteToInvocation in gnu/expr/InlineCalls.java.
--
--Per Bothner
per@bothner.com http://per.bothner.com/