Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide ViewActions implementation details. Javadoc normalization. #96

Merged
merged 1 commit into from
Dec 3, 2014

Conversation

JakeWharton
Copy link
Member

Refs #91.

@JakeWharton
Copy link
Member Author

These actions are so trivial to implement that it's a giant liability and waste to expose them as public API.

@JakeWharton JakeWharton force-pushed the jw/hide-all-the-things branch 9 times, most recently from 4a7e0bd to 982b916 Compare November 27, 2014 07:58
@dlew
Copy link
Collaborator

dlew commented Nov 27, 2014

👍

Curious API design question: would you still use checkNotNull if we add @NotNull available?

@hamidp
Copy link
Contributor

hamidp commented Nov 27, 2014

👍

Also +1 for @NotNull

@ronshapiro
Copy link
Contributor

Any reason for anonymous classes vs. just package-private ones? Core seems to prefer having the implementation of the classes stowed away in their own files.

@ronshapiro
Copy link
Contributor

@JakeWharton what's your reasoning for not wanting to keep a WeakReference to the view? I remember @mttkay and @dpsm expressing interest in this a while back.

@JakeWharton
Copy link
Member Author

would you still use checkNotNull if we add @NotNull available?

Yes. @NotNull does no actual validation, just hints to static tooling which can be ignored by callers.

Any reason for anonymous classes vs. just package-private ones?

Just because they're like 6 lines long. In reality they're 5 lines of boilerplate and 1 line of code. They would be lambdas had we Java 8 language features.

I think actual classes (even if package scoped) are only deserved if there's something interesting happening beyond just implementing a single-method interface or abstract class with one line of code.

what's your reasoning for not wanting to keep a WeakReference to the view

It conflates the responsibility and importance of a subscription. If I assume responsibility for managing a subscription then there's no harm in library code holding a strong reference.

mttkay added a commit that referenced this pull request Dec 3, 2014
Hide ViewActions implementation details. Javadoc normalization.
@mttkay mttkay merged commit 1c34955 into 0.x Dec 3, 2014
@mttkay mttkay deleted the jw/hide-all-the-things branch December 3, 2014 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants