Java generics "capture of ?"
<p>I'm working with a <code>TreeTable</code> and when changing cell factory I am required to pass a</p>

<pre><code>Callback&lt;TreeTableColumn&lt;A, capture of ?&gt;, TreeTableCell&lt;A, capture of ?&gt;&gt;
</code></pre>

<p>where A is a class I am working with but I have no idea how to work with the "capture of ?"</p>

<p>I tried to create</p>

<pre><code>new Callback&lt;TreeTableColumn&lt;A, ?&gt;, TreeTableCell&lt;A, ?&gt;&gt;
</code></pre>

<p>but IDEA shows warning</p>

<pre><code>setCellFactory(Callback&lt;TreeTableColumn&lt;A, capture&lt;?&gt;&gt;, TreeTableCell&lt;A, capture&lt;?&gt;&gt;&gt;) in TreeTableColumn cannot be applied to (anonymous Callback&lt;TreeTableColumn&lt;A, ?&gt;, TreeTableCell&lt;A, ?&gt;&gt;)
</code></pre>

<p>I tried using specific classes (like String) instead of "?" as well, but nothing helped.</p>

<p>Could anyone explain to me how to work with this?</p>

<p>Thank you.</p>

<p>EDIT:</p>

<p>I gathered a little bit more information.. the <code>CellFactory</code> of <code>TreeTableColumn&lt;S,T&gt;</code> should be <code>Callback&lt;TreeTableColumn&lt;S,T&gt;</code>,<code>TreeTableCell&lt;S,T&gt;&gt;</code>, however, the TreeTableColumn that I'm working with is created as a raw type (in a library).</p>

<p>Using a raw type Callback works. But are there any other options how to work this around?</p>