convert global class to a defined type