Annotation Interface Experimental
@Documented
@Retention(RUNTIME)
@Target({TYPE,METHOD,CONSTRUCTOR,FIELD})
public @interface Experimental
Marks an API as experimental.
标记一个 API 为实验性的。
Experimental APIs may change or be removed in future releases without notice. They are available for early feedback but should not be relied upon in production.
实验性 API 可能在未来版本中更改或删除,恕不另行通知。 它们可供早期反馈使用,但不应在生产环境中依赖。
Example / 示例:
@Experimental(since = "1.0.0", reason = "API shape may change based on community feedback")
public class ReactiveHttpClient { ... }
Features | 主要功能:
- Mark APIs as experimental at type, method, constructor, or field level - 在类型、方法、构造器或字段级别标记API为实验性
- Configurable since version and reason - 可配置起始版本和原因
- Runtime retention for reflective access - 运行时保留以支持反射访问
Usage Examples | 使用示例:
@Experimental(since = "1.0.0", reason = "API shape may change")
public class NewFeature { }
Security | 安全性:
- Thread-safe: Yes (annotation is immutable) - 线程安全: 是(注解不可变)
- Null-safe: Yes - 空值安全: 是
- Since:
- JDK 25, opencode-base-core V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Optional Element Summary
Optional Elements
-
Element Details