[jboss-user] [JBoss AOP] - Problem using mixins to overload a superclass method
Jesper Thuun-Petersen
do-not-reply at jboss.com
Mon Feb 14 08:12:45 EST 2011
Jesper Thuun-Petersen [http://community.jboss.org/people/jepet] created the discussion
"Problem using mixins to overload a superclass method"
To view the discussion, visit: http://community.jboss.org/message/587252#587252
--------------------------------------------------------------
I have a class hierarchy like this:
{code}A extends JComponent{code}
{code}B extends A{code}
I want to introduce an overloaded version of the {code}setVisible(..){code} method into class B using mixins, and do something like this:
{code}
@Mixin(target = B, interfaces = C)
public static CImpl doMixin(B b){
return new CImpl(b);
}
{code}
the C interface has a {code}setVisible(..){code} method, thereby overriding the original JComponent-version of the {code}setVisible(..){code} method.
My problem is, that I'm unable to call the original JComponent version of setVisible, as my mixin-class CImpl does not extend B (and wouldn't be the same object at runtime anyway).
Is there a way to get hold of the original setVisible(..) method, as I cannot call super in the CImpl class?
Regards
/Jesper Thuun-Petersen
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/587252#587252]
Start a new discussion in JBoss AOP at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2027]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110214/1cc7e972/attachment-0001.html
More information about the jboss-user
mailing list