Java abstract class Implementing with generics
<p>I have an abstract class with generic (T1) that extends my Filterable interface:</p>

<pre><code>public abstract class AbstractAdapter &lt; T1 extends Filterable, T2 extends AbstractAdapter.Cell &gt; extends ArrayAdapter &lt; T1 &gt; {

    public abstract class Cell {
        public T1 info;
        //...
    }

    public abstract void setData(T2 cell, int position);

    //...
}
</code></pre>

<p>And i have concrete class with method (setData) and Cell class implementations: </p>

<pre><code>public class ConcreteAdapter extends AbstractAdapter &lt; InfoClass, ConcreteAdapter.Cell &gt; {

    public class Cell extends AbstractAdapter.Cell {
        //...
    }

    @Override
    public void setData(Cell cell, int position) {
        InfoClass info = (InfoClass)cell.info; // need to cast from Filterable to InfoClass (why?). Or i have compilation error
    }

    //...
}
</code></pre>

<p>So, i have ConcreteAdapter class with first generic class as InfoClass (that extends Filterable), in method setData i have Cell class object, but field "info" i see just as Filterable, not InfoClass. I think, field "info" already should be as generic type, because it declared as</p>

<blockquote>
  <p>T1 info;</p>
</blockquote>

<p>but not</p>

<blockquote>
  <p>Filterable info;</p>
</blockquote>

<p>Is it possible change field type from extendable to generic class without cast? Or its a bug in IDE?</p>