JetBrains / JetBrains/java-annotations

add VisibleForReflection

Open
#99 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Kotlin
Stars
463
Forks
72
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.