The C Statistics API provides the following functions for class handling:
ba_get_num_classes() returns the number of classes that are defined for a given interface.
ba_list_class_names() returns a list of the classes that are defined for a given interface, together with their respective parent classes.
ba_list_classes() returns a list of the parent and child classes for a specified interface.