1. A computer-implemented method for specifying a hierarchy of user-defined classes of graphical objects comprising: graphically specifying a first class of graphical objects and a second class of graphical objects in a graphical modeling environment; and graphically specifying, in the graphical modeling environment, at least one child class of graphical objects that is a subclass of the first class of graphical objects and the second class of graphical objects for the hierarchy of classes of graphical objects, wherein a number of inputs and a number of outputs of the at least one child class depend respectively on a number of inputs and a number of outputs of the first class of graphical objects and the second class of graphical objects.