1. A computer-implemented method comprising: receiving a graphical specification of a parent class of graphical objects in a graphical modeling environment; receiving a graphical specification of a first child class of graphical objects and a second child class of graphical objects in the graphical modeling environment, wherein: the first child class of graphical objects is a first subclass of the parent class of graphical objects in a hierarchy of classes of graphical objects, the second child class of graphical objects is a second subclass of the parent class of graphical objects in the hierarchy of classes of graphical objects, and the first child class of graphical objects and the second child class of graphical objects depend respectively on the parent class of graphical objects for common features that are shared by the first child class of graphical objects and the second child class of graphical objects; receiving an instruction to incorporate an instance of the parent class of graphical objects into an executable graphical model in the graphical modeling environment; instantiating an instance of the first child class of graphical objects and an instance of the second child class of graphical objects in the executable graphical model; executing the executable graphical model; and dynamically switching, using a processor, between the instance of the first child class of graphical objects and the instance of the second child class of graphical objects during the execution of the executable graphical model.