Constructor arguments can be used for 2 reasons:
* Things that are required for the object to work, should be put in the constructor.
* Sometimes, you can use constructor arguments to make your live easier.

In this case, the UrlGenerator is something that's required for this object to work.

Setters, on the other hand, can be used...
* ...when it's optional (e.g. a logger)
* ...when you cannot add it when initializing it (e.g. when the constructor is created in an listener and you have to add information about the current user in the controller)