So this is exactly how I want it to work but I'm just confused on why it works. I register the object in parent class but subscribe events in child class.
By registering the object in the parent class, wouldn't EventBus be seeing type parent class(only events subscribed
in parent class)?
If that's the case, how is it able to see the events that are subscribed in child class then?
If someone can clarify this that would be awesome thanks!
"No, the child classes inherit the parent's methods. But the type when register(class) is called at runtime will be the type of the child, not the parent (class instanceOf Child). Hence EventBus only discovers the @Subscribed methods in the child class."