JetBrains / JetBrains/java-annotations
add VisibleForReflection
- 主要语言
- Kotlin
- 星标
- 463
- 派生
- 72
- PR 合并指标
- 30 天内没有已合并 PR
描述
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.
贡献指南
调研方向
The issue names no source files, tests, or implementation entry point. First clarify the intended annotation behavior and warning mechanism, including how reflective access and legitimate subclasses or tests should be distinguished; done should include an agreed API and corresponding validation.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- kotlin
- 领域
- tooling
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 30/100