Skip to content
This repository has been archived by the owner on Dec 25, 2019. It is now read-only.

@Subscribe visibility? #31

Closed
renaudcerrato opened this issue Mar 9, 2015 · 5 comments
Closed

@Subscribe visibility? #31

renaudcerrato opened this issue Mar 9, 2015 · 5 comments

Comments

@renaudcerrato
Copy link

It would be nice to be able to use private/protected/package methods as @subscribe... Public methods are pollutions.

@sergejsha
Copy link
Owner

This was an explicit design decision. The reason for that is that future versions of TinyBus may use generated code instead of runtime reflection. Keeping methods public will give more flexibility if case of such changes in the future.

@renaudcerrato
Copy link
Author

Make sense. Would be nice to generate a warning though ;)

@sergejsha
Copy link
Owner

You mean when a method is private of protected?

On Mon, Mar 9, 2015 at 4:48 PM, nono240 notifications@github.com wrote:

Make sense. Would be nice to generate a warning though ;)


Reply to this email directly or view it on GitHub
#31 (comment).

@renaudcerrato
Copy link
Author

Yes, at compile time of course - at least for Android Studio. Dagger raise an error is the field is private.

@sergejsha
Copy link
Owner

Agree. That what I was thinking about. I didn't want to introduce these checks at runtime. But it's a good idea to have them at compile time. Just created a separate TODO for it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants