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

add VisibleForReflection #99

Open
xenoterracide opened this issue Mar 12, 2024 · 0 comments
Open

add VisibleForReflection #99

xenoterracide opened this issue Mar 12, 2024 · 0 comments

Comments

@xenoterracide
Copy link

So, I've been thinking about how one could warn a user that a constructor or method really only exists for reflective access. This is mostly an issue when dealing within the same package these days.

JPA for example requires a public/protected constructor. I personally am always going to use a protected one, but that still shouldn't be called outside of subclasses, or maybe tests.

So my thought is an annotation like VisibleForReflection would be nice.

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

No branches or pull requests

1 participant