public interface KeyGenerator
An interface to generated keys from strings.
  • Field Details

    • AS_IS

      static final KeyGenerator AS_IS
      A KeyGenerator implementation that returns the given string as-is, or an empty string if the argument is null.
    • CAMEL_TO_KEBAB

      static final KeyGenerator CAMEL_TO_KEBAB
      A KeyGenerator implementation that converts camelCase to kebab-case.
    • CAMEL_TO_SNAKE

      static final KeyGenerator CAMEL_TO_SNAKE
      A KeyGenerator implementation that converts camelCase to snake_case.
  • Method Details

    • generate

      @NotNull @NotNull String generate(@Nullable @Nullable String source)
      Generates the key from the given string.
      Parameters:
      source - the string to generate the key
      Returns:
      the generated key