define-simple-class feature request: calling inherited methods
Vladimir Tsichevski
wowa@jet.msk.su
Thu Mar 20 15:29:00 GMT 2003
Hi,
in classes defined with define-simple-class etc. it would be useful to
add to the class scope public and protected methods of classes and
interfaces the newly creates class inherits from.
For example, in class inherited from java.awt.Component, in which
enableMask() is protected, it would be possible to write just:
(enableEvents mask)
instead of:
((primitive-virtual-method
<java.awt.Component>
'enableEvents <void>
(<long>))
(this) mask))))
As this example shows, not only will this make code cleaner, but also
allow access to protected members, which is otherwise requires clumsy
and dangerous constructs using primitive-virtual-method.
Regards,
Vladimir
More information about the Kawa
mailing list