Collection of Interfaces to pick from, Java
<p>Consider that object wrapped in <code>DataContainer</code> will be handed out to client</p>

<pre><code>// Will be handed out
public interface DataContainer 
</code></pre>

<p>In order to use it, client currently needs to know to cast the object to:</p>

<pre><code>public interface ConcreteObject_1_Container extends DataContainer
public interface ConcreteObject_2_Container extends DataContainer
</code></pre>

<p>Is it possible to offer both <code>ConcreteObject1Container</code> and <code>ConcreteObject2Container</code> as options to be chosen from, similar to how <code>Enum</code> options can be picked?</p>

<p><strong>Instead of</strong> user magically knowing to use <code>FileContainer</code></p>

<pre><code>                                   // user knows
FileContainer   fileContainer   = (FileContainer) 
                ContainerFactory.getContainerFor(DataSource.FILE, 
                                                 TREAT_AS_SOURCE);
</code></pre>

<p><strong>I'd like to</strong> </p>

<pre><code>                                  // user selects
FileContainer   fileContainer   = (GenericContainer.FileContainer) 
                ContainerFactory.getContainerFor(DataSource.FILE, 
                                                 TREAT_AS_SOURCE); 
</code></pre>
