Extracts constants into a enum.