thanks for your attention, I'll attach my current version (absolutely
untested) just to give the idea.
If you look at the current trunk the last listener handling
is not consistent with the others; I thought it was "suspect",
but forgot to mention it in my previous post.
2008/8/23 Hardy Ferentschik <hibernate(a)ferentschik.de>:
I have a few comments, since I was the last one working on the code. I hope
you might find this helpful.
First of all, EventListenerRegister has its origin in the Annotations
project and just recently got moved from Annotations to Search (where it
actually belongs). I applied some refactorings, but the biggest outstanding
refactoring would be to generalise the registration of the listeners. I
tried one apporach, but the code became very hard to read. So I decided to
leave this part as is for now.
Initially I wanted to get rid of the old registration code completely and if
you check the history of the class you will see that I did not have
'searchEventListenerClass == eventListener.getClass().getSuperclass();' at
all. It worked fine for the latest versions of Annotations and Search.
However, I think there were problems when using different combinations of
Annotations and Search. For that reason Emmanuel added this additional
check. It evades me right now what the actual reason was.
Regarding "isAssignableFrom" - you might be right. Let me have another look
at the code and come back to you.