Enum Class EscapeType
- All Implemented Interfaces:
Serializable,Comparable<EscapeType>,Constable
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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionApplies the associated escape method to the provided input string.static EscapeTypefromString(String escapeType) Retrieves the corresponding EscapeType from a string representation.static EscapeTypeReturns the enum constant of this class with the specified name.static EscapeType[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
JSON
-
XML
-
URL
-
REGEX
-
WINDOWS
-
CMD
-
POWERSHELL
-
LINUX
-
BASH
-
SQL
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
escape
Applies the associated escape method to the provided input string.- Parameters:
input- the string to be escaped- Returns:
- the escaped string
-
fromString
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
-