Refactor EnumUtils and make it AOT-friendly.
#2200
Merged
EnumUtils and make it AOT-friendly.
#2200