Enum Class HookEvent

java.lang.Object
java.lang.Enum<HookEvent>
com.tnsai.server.hooks.HookEvent
All Implemented Interfaces:
Serializable, Comparable<HookEvent>, Constable

public enum HookEvent extends Enum<HookEvent>
Lifecycle events that hooks can listen for.
  • Enum Constant Details

    • PRE_TOOL_USE

      public static final HookEvent PRE_TOOL_USE
    • POST_TOOL_USE

      public static final HookEvent POST_TOOL_USE
    • ON_START

      public static final HookEvent ON_START
    • ON_STOP

      public static final HookEvent ON_STOP
    • ON_ERROR

      public static final HookEvent ON_ERROR
  • Method Details

    • values

      public static HookEvent[] 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 HookEvent 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
    • fromYaml

      public static HookEvent fromYaml(String value)
      Parse a YAML string like "preToolUse" or "pre_tool_use" into an enum constant.