For both the java enum and scala enum formats.