This is the mail archive of the kawa@sources.redhat.com 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]

Re: instance?


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/


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