code: private <T> String transform(T enumConstant, TypeAdapter<T> delegateAdapter) {
          try {
              final String enumValue = ((Enum) enumConstant).name();
              final boolean hasSerializedNameAnnotation = enumConstant.getClass().getField(enumValue)
                      .isAnnotationPresent(SerializedName.class);
              return hasSerializedNameAnnotation ? delegateAdapter.toJsonTree(enumConstant).getAsString() :
                      enumValue.toLowerCase();
          } catch (NoSuchFieldException e) {
              // should never happen
              throw new RuntimeException(e);
          }
      }
docs: Transforms the given enum constant to lower case. If a {@code SerializedName} annotation is present, the default
  adapter result is returned.
  
  @param enumConstant    the enumeration constant
  @param delegateAdapter the default adapter of the given type
  @return the transformed string representation of the constant