title: How can I create implementations of interfaces, that are use specific implementations of other interfaces?
body: <p>I definitely could not explain what I mean in the title. The issue is either too stupid or too complicated, but the bottom end is that I could not find an appropriate design pattern for it.</p>
  
  <p>So to the point, lets assume that we have class A which contains a reference to interface B. A computational procedure determines which implementation of B is appropriate and instantiates a new object. So far so good (I think).</p>
  
  <p>Now B has a method that is based on a set of parameters. Object A holds a set of default parameters but any set may be given on demand. The tricky part is that parameters are completely different among implementations of interface B. In truth these parameters are different objects themselves with their own methods, which are different per implementation of B. </p>
  
  <p>My initial approach was to create an interface C for the parameters, and then create one implementation of C for each implementation of B (its a one-to-one relation), but that did not seem right. If not anything else, in each unique implementation of B, I had to cast C to the respective implementation needed to call its unique functions. </p>
  
  <p>One can only assume there are prettier ways! Any ideas?</p>