Class ObjectIdGenerators
java.lang.Object
cloud.opencode.base.json.identity.ObjectIdGenerators
Object ID Generators - Common Object Identity Generator Implementations
对象 ID 生成器集合 - 常用对象身份生成器实现
Provides built-in generator implementations for common identity strategies: auto-incrementing integers, UUIDs, property-based IDs, and string IDs.
提供常用身份策略的内置生成器实现:自增整数、UUID、基于属性的 ID 和字符串 ID。
Example | 示例:
@JsonIdentityInfo(generator = ObjectIdGenerators.IntSequenceGenerator.class)
public class Node {
private String name;
private List<Node> children;
}
Security | 安全性:
- Thread-safe: IntSequenceGenerator uses AtomicInteger - 线程安全: IntSequenceGenerator 使用 AtomicInteger
- Null-safe: Generators accept null forPojo where applicable - 空值安全: 生成器在适用时接受空 forPojo
- Since:
- JDK 25, opencode-base-json V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classInteger Sequence Generator - Auto-Incrementing Integer IDs 整数序列生成器 - 自增整数 IDstatic classProperty Generator - Uses an Existing Property as Object ID 属性生成器 - 使用现有属性作为对象 IDstatic classString ID Generator - String-Based Object IDs 字符串 ID 生成器 - 基于字符串的对象 IDstatic classUUID Generator - UUID-Based Object IDs UUID 生成器 - 基于 UUID 的对象 ID -
Method Summary