Enum Class StringCase

java.lang.Object
java.lang.Enum<StringCase>
nl.datasteel.crudcraft.codegen.util.StringCase
All Implemented Interfaces:
Serializable, Comparable<StringCase>, Constable

public enum StringCase extends Enum<StringCase>
Utility for transforming strings into a specific casing style.
  • Enum Constant Details

    • CAMEL

      public static final StringCase CAMEL
      lowerCamelCase style.
    • PASCAL

      public static final StringCase PASCAL
      UpperCamelCase style.
    • SNAKE

      public static final StringCase SNAKE
      snake_case style.
    • KEBAB

      public static final StringCase KEBAB
      kebab-case style.
    • UPPER_SNAKE

      public static final StringCase UPPER_SNAKE
      UPPER_SNAKE_CASE style.
  • Method Details

    • values

      public static StringCase[] 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 StringCase 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
    • apply

      public abstract String apply(String input)
      Applies the case conversion to the given input.
      Parameters:
      input - a non-null string
      Returns:
      the converted value