Class StrategyRegistry

java.lang.Object
cloud.opencode.base.string.desensitize.strategy.StrategyRegistry

public final class StrategyRegistry extends Object
Strategy Registry - Registry for desensitization strategy lookup. 策略注册表 - 用于脱敏策略查找的注册表。

Features | 主要功能:

  • Singleton strategy registry - 单例策略注册表
  • Built-in strategies (mobile, email, name, etc.) - 内置策略
  • Custom strategy registration - 自定义策略注册

Usage Examples | 使用示例:

StrategyRegistry registry = StrategyRegistry.getInstance();
DesensitizeStrategy strategy = registry.get("mobile");
registry.register("custom", s -> s.substring(0, 2) + "***");

Security | 安全性:

  • Thread-safe: Yes (ConcurrentHashMap) - 线程安全: 是(ConcurrentHashMap)
  • Null-safe: No (keys must not be null) - 空值安全: 否(键不能为空)
Since:
JDK 25, opencode-base-string V1.0.0
Author:
Leon Soo www.LeonSoo.com
See Also: