A function that, given a list of ports, returns a StructuredType
of which the fields names and field types correspond with the given ports.
The arguments to this function (the array returned by getVariables())
represent the types of the ports, in the same order as the ports
are defined. The concrete subclass of StructuredType that
is to be instantiated by this function depends on the type parameter
passed to the constructor.