Make EventBus(EventBusBuilder) constructor public.#281
Make EventBus(EventBusBuilder) constructor public.#281trashkalmar wants to merge 1 commit intogreenrobot:masterfrom
Conversation
|
But this will break the build pattern, if so, user can just new IMO, If there are many choices, there's no choices. What do you say? |
|
Why? User can continue to use pattern and create EventBus instance with builder. However, at this time I'm unable to use EventBus as base class and create descendants configured with the builder. |
|
What's the use case for subclassing EventBus? |
|
Use case is very simple. I'd like to perform some action while registering event handler, i.e. override register/unregister methods in EventBus. Also I'd like to customize EventBus`s behavior with Builder (disable event inheritance in my case). |
|
@greenrobot so, what do you think? |
There are scenarios when it is better to use EventBus as base class. In this case it is impossible to construct custom class which is configured by EventBusBuilder builder.
This PR makes the
EventBus(EventBusBuilder)constructor public to support latter case.