Passing Properties to Factory method
I have a factory method which returns implementation of an interface. The thing is - implementations have different constructor parameters. My question is - how to pass parameters through factory method to different implementations of the interface? I have an idea, but I'm not sure if it makes sense - pass Properties object to factory method? This way each of interface implementations can get the properties that needs for its constructor, while factory interface will be unified. Does this make sense, or there is a better solution? I decided to add-up an example, so I could clarify the problem