add VisibleForReflection
还没有人认领这个 Issue。
评估
调研方向
该 issue 未指定源文件、测试或实现入口。首先明确预期的注解行为和警告机制,包括应如何区分反射访问与合法的子类或测试;完成标准应包括一套达成一致的 API 及相应的验证。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Kotlin
- 星标
- 465
- 派生
- 74
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
JetBrains/java-annotations 的其他 Issue
-
@TestOnly should be allowed for ElementType.PACKAGE可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 65/100
JetBrains/java-annotations#123 ·
-
难度 5/5 一周以上 新手友好度 25/100
JetBrains/java-annotations#134 · 6 条评论 · 1 个 reaction ·
-
Add AndroidTarget as KMP target可能重新可做 @serjsysoev 于 519 天前认领,目前没有进行中的 PR。 未关闭
JetBrains/java-annotations#125 · 1 个 reaction · 已指派 1 人 ·
-
难度 4/5 3-5 天 新手友好度 35/100
JetBrains/java-annotations#122 · 2 条评论 ·
-
Allow use of @Language on (formatted-)string literals可能重新可做 @serjsysoev 于 695 天前认领,目前没有进行中的 PR。 未关闭
JetBrains/java-annotations#117 · 4 条评论 · 已指派 1 人 ·
查看 JetBrains/java-annotations 的全部 Issue
相似的 Issue
-
enhancement
难度 2/5 1 小时以内 新手友好度 72/100
afarber/OpenMapView#22 ·
-
Feature:Resolution
难度 2/5 1-3 小时 新手友好度 72/100
intellij-elixir/intellij-elixir#4396 ·
维护者通常 1 天内回复
-
ExprQuerySet.getChildren() omits WITH clause可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭bug
难度 2/5 1-3 小时 新手友好度 66/100
partiql/partiql-lang-kotlin#1972 ·
-
难度 2/5 1-3 小时 新手友好度 62/100
navikt/soknadsarkiverer#293 ·
-
enhancement
难度 2/5 1-3 小时 新手友好度 62/100
FoedusProgramme/Gramophone#1048 ·