-
Notifications
You must be signed in to change notification settings - Fork 746
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
Proposal: VisibleForAccessors #765
Comments
An example: uber/AutoDispose#103 |
There is an Android Lint rule for My personal experience is that Java's However, an annotation like this would be handy to apply to packages in Java libraries that organize some implementation details in separate packages like |
Dupe of #537 |
Or related to, at least |
Error-Prone already has a check for RestrictTo RestrictToEnforcer. There is also a RestricedApiChecker which enforces whitelisting on some path. It can be very verbose and is only true for methods. A similar test can be added to this suit. I can send a PR if the error-prone team is ok about the check. This issue can then be closed in favor of #537. |
On android we have method limits, and one means of mitigating them is to avoid synthetic accessor methods. A downside of this would be that sometimes you're left making certain things package-local when you'd normally make them private. What would you think of an annotation like
@VisibleForAccessors(otherwise = PRIVATE)
? Similar to@VisibleForTesting
, but to enforce these are treated the same way asotherwise
(whose value could default toPRIVATE
) during compilation,The text was updated successfully, but these errors were encountered: