This content has been marked as final.
Show 1 reply
-
1. Re: Inherit @Observer annotation
kragoth Dec 8, 2009 12:42 AM (in response to m23)Well, of course the really easy way to do this is like this:
In your superclass you have this (NOTE: This code is NOT compiled or checked just typed straight out of my head early in the morning :P)
public abstract class superAbstractObserverClass { abstract void observeMethod(); @Observer("booyah") public void observerBooyah() { observeMethod(); } }
So, now all implementations of superAbstractObserverClass have to implement the observerMethod.
There's probably much better ways of doing this but... best I could come up with at the moment :P
Oh, and this is not tested so I'm not even 100% sure that it works... but it should :P