Thanks Chouser for showing it in a more general way!

I've now created an abstract Java class (.java) from the abstract base
class, with public methods with different names which in turn call now
the original, protected final methods. But this is an ugly hack in my
eyes and I think, Clojure should be able to handle this case - I mean,
it's not that rare, right? Especially with a GUI framework like Qt
Jambi, one sometimes has to extend an abstract class to provide
functionality for some widgets. I would expect other frameworks to
have similar demands (but, not really a Java developer, so I might be
wrong here).

A cleaner Clojure way to do this, even if it's all in Java world and
not really lispy, would be nice.


Thanks and greetings,
SD


On Sep 15, 9:26 pm, Chouser <[email protected]> wrote:
> On Tue, Sep 15, 2009 at 2:08 PM, Sir Diddymus <[email protected]> 
> wrote:
>
> > Dear all,
>
> > I've successfully extended a Java class (:gen-class and :extends) and
> > all is working as expected, until I was forced to call a protected
> > final method of the superclass from within my derived class. I don't
> > seem find a way to do this (:exposes-methods really is only for
> > overridden methods?) - is it even possible?
>
> I created a standalone example that demonstrates the
> problem:
>
>        http://paste.lisp.org/display/87106#1
>
> I think it comes down to gen-class's non-private-methods
> function which is used both for auto-generated stub methods
> and for the list of methods :exposes-methods will accept.
> It specifically excludes final methods, which makes perfect
> sense for auto-generated stubs, but perhaps not for
> :exposes-methods.
>
> Would it be worth using a slightly different definition of
> "non-private" for :exposes-methods to support this use case?
>
> --Chouser
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to