Enum Class ConfigChangeType

java.lang.Object
java.lang.Enum<ConfigChangeType>
cloud.opencode.base.config.ConfigChangeType
All Implemented Interfaces:
Serializable, Comparable<ConfigChangeType>, Constable

public enum ConfigChangeType extends Enum<ConfigChangeType>
Configuration Change Type Enumeration 配置变更类型枚举

Defines the types of configuration changes that can occur during runtime. Used in conjunction with ConfigChangeEvent to track configuration modifications.

定义运行时可能发生的配置变更类型。与ConfigChangeEvent结合使用以跟踪配置修改。

Features | 主要功能:

  • ADDED - New configuration key added - 新增配置键
  • MODIFIED - Existing configuration value changed - 现有配置值修改
  • REMOVED - Configuration key deleted - 配置键删除

Usage Examples | 使用示例:

// Check change type
ConfigChangeEvent event = ...;
if (event.changeType() == ConfigChangeType.ADDED) {
    // Handle new configuration
}

// Use convenience methods in ConfigChangeEvent
if (event.isModified()) {
    String oldValue = event.oldValue();
    String newValue = event.newValue();
    // Handle modification
}

Security | 安全性:

  • Thread-safe: Yes (enum) - 线程安全: 是(枚举)
  • Immutable: Yes - 不可变: 是
Since:
JDK 25, opencode-base-config V1.0.0
Author:
Leon Soo www.LeonSoo.com
See Also:
  • Enum Constant Details

    • ADDED

      public static final ConfigChangeType ADDED
      New configuration key added 新增配置键
    • MODIFIED

      public static final ConfigChangeType MODIFIED
      Existing configuration value changed 现有配置值修改
    • REMOVED

      public static final ConfigChangeType REMOVED
      Configuration key removed 配置键删除
  • Method Details

    • values

      public static ConfigChangeType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ConfigChangeType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null