Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] protected inter-type methods

Pardon if this has already been discussed, but according to the documentation (and the compiler), "AspectJ does not provide protected inter-type members."
Why?  This works against modularity, in my case.
I'd like to advise certain protected methods implemented in third-party classes which I have subclassed, but I only want to weave my classes, not the third-party jars. Because I can't introduce protected methods to these subclasses, I believe I am forced to put stub methods in their source that invoke the super methods, and advise these stub methods instead. This is not a grotesque workaround, but inserting code in the subclasses that has meaning only to the aspect breaks the encapsulation of the aspect. Or am I missing something?



Back to the top