use Class.getEnumConstants() instead of reflection