Imagine the following case: I have a class Method and a class DataType. A method has one return type (if we count void as a return type) and zero to many parameters. Both the return type and the parameters are instances of the class DataType.
How would I model this Situation in a UML class diagram? One line for two references or one for each?


The best way would be to use role names instead:
Role names are explicit attributes in the opposite class, telling how the specific class is used. So
Method.parameteris of typeDataType.Note that I changed the
return typeto be0..1rather than1since your text tells that it's optional.