You can get Enum String value by "Enum::name"
public static String[] names() {
return Arrays.stream(State.values()).map(Enum::name).toArray(String[]::new);
}
This implementation does not require additional "function" and "field". Just add this function to get the result you want.