Czar
04/28/2017, 7:01 AMclass Projector {
fun <T:LoanTransactionEvent> handle(event: T) {
event.handleWith(this)
}
}
interface LoanTransactionEvent {
default void handleWith(Projector projector) {
// your event-specific stuff here
}
}
And now you can call it in the loop exactly as @snowe wanted. (I was too lazy to test, so there may be some mechanical errors).snowe
04/28/2017, 2:39 PM@EventHandler
annotation to find methods that might handle events. then it uses a parameter resolver to find if the event fires any of the methods. Since almost all of our events inherit from LoanTransactionEvent
this would fire for every event instead of just the few events I want it to fire for. 😕Czar
05/01/2017, 6:37 AM