Generator implementation of class mapping.