Conforming to base classes [KAWA]

Chris chrisb@nimrod.itg.telstra.com.au
Wed Sep 6 22:25:00 GMT 2000


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.


More information about the Kawa mailing list