java.lang.Object
java.lang.Enum<EscapeType>
org.sentrysoftware.metricshub.engine.common.helpers.EscapeType
All Implemented Interfaces:
Serializable, Comparable<EscapeType>, Constable

public enum EscapeType extends Enum<EscapeType>
Enum representing various escape types, each associated with a specific method in the MacrosUpdater class that handles the escaping of special characters for that type. Each constant references a method that takes a String input and returns an escaped String output
  • Enum Constant Details

  • Method Details

    • values

      public static EscapeType[] 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 EscapeType 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
    • escape

      public String escape(String input)
      Applies the associated escape method to the provided input string.
      Parameters:
      input - the string to be escaped
      Returns:
      the escaped string
    • fromString

      public static EscapeType fromString(String escapeType)
      Retrieves the corresponding EscapeType from a string representation.
      Parameters:
      escapeType - the string representation of the escape type
      Returns:
      the corresponding EscapeType
      Throws:
      IllegalStateException - if the provided string does not match any escape type