Support creating child classes based on discrimators.