Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] declare parents with delegate

Santi Villalba wrote:
That won't work if the methods are not already there, so, if the superclass is abstract or an interface, it does not rescue the
developer from writing the abstract methods...

Hi,
indeed, I recently had this situation. In case "myTarget" is a
Interface, I use a dynamicProxy to implement it. It doesn't need
to have any usable Implementation, because any call will be
advised and redirected. It is just there "to make javac happy".
Ok, this is ugly, but I don't have to implement any methot by hand.


It also has some others drawbacks, like that it doesn't allow for an
 easy redefinition of the methods...
this is true, though. At the moment, I see no easy solution besides
having another advice with higher precedence for the calls, I want
to handle in a specific manner. Any other suggestions?

--

Best regards
Hermann Vosseler




Back to the top