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]

Conforming to base classes [KAWA]


I don't understand how to write a Kawa module that conforms to a Java
base class. Like let's say I want to override hashCode from Object.
hashCode returns an int. I can't just go...

(define (hashCode) 1)

that translates to...

public static IntNum hashCode$1()

Now, why is it static?? Why does it translate to hashCode$1? How can I
get it to return an int?

I've tried the following with no success...

(define (hashCode :: <int>) 1)
(define (hashCode :: <integer>) 1)
(define (hashCode :: <Integer.TYPE>) 1)

none of which have any effect.

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