octavian-nita
9/20/2019 - 11:59 AM

Camel name :)

package ...;

import static com.google.common.base.CaseFormat.*;
import static com.google.common.base.CharMatcher.is;

class CamelName {

  static <E extends Enum<E>> String camelName(E enumValue) {
    return enumValue == null ? null : UPPER_UNDERSCORE.to(LOWER_CAMEL, is('_').trimLeadingFrom(enumValue.name()));
  }

}