Uh oh!
There was an error while loading. Please reload this page.
Added visibility matchers to check that a class isPublic(), etc. - #291
Added visibility matchers to check that a class isPublic(), etc.#291brownian-motion wants to merge 1 commit into
Conversation
brownian-motion
commented
Apr 16, 2020
Re-wrote the implementation to be much, much smaller. Code coverage is now 100%, and the public API is organized in one class rather than in 4 different ones. |
brownian-motion
commented
Apr 16, 2020
@scarytom , @sf105 , or @tumbarumba , would you please consider reviewing this PR when convenient? I understand that maintaining this and other repositories requires a significant amount of your attention, on top of your work outside of this project, and I would very much appreciate your time if any of you are willing to offer it. |
sf105
commented
Apr 19, 2020
Interesting idea. Would this make more sense in a package called reflection? |
sf105
commented
Apr 19, 2020
Do we need the extra VisibilityUtils class? Utils is often a smell |
brownian-motion
commented
Apr 20, 2020
@sf105 Thank you for taking a look. I agree, it would make sense in a |
nhojpatrick
commented
Jun 29, 2020
@brownian-motion looks good, please can you rebase from master, as |
brownian-motion
commented
Jul 14, 2020
@nhojpatrick I will rebase like you've described. Thanks! |
brownian-motion
commented
Jul 1, 2021
Welp. Got a little caught up during the pandemic. I'll clean this up. |
@nhojpatrick or @sf105 assuming this passes the build checks, would you please take a look at this when convenient? I've rebased, and applied the style settings from the repository checkstyle file. |
…flective elements. This is helpful, for example, when enforcing the scope of a public-facing API with a test, and provides stronger documentation for the future than mere comments.
nhojpatrick
commented
Feb 13, 2022
Going to try and kick start hamcrest, so if you want to get it merged, please rebase from the branch |
9bc653b to
e9f7fc8Compare
Covers all 4 visibilities, and all reflective elements (classes, methods, fields, etc.) with reasonable messages when used incorrectly.
These matchers are helpful, for example, when enforcing the scope of a public-facing API with a test,
which provides stronger documentation for the future than mere comments.
I've performed similar checks in the past in projects with many, many artifacts to make sure that certain methods are definitely visible outside of a library, for consumption by another library or for invocation by reflective techniques.