So I have something like the following:
public class Enclosing<T extends Comparable<T>> {
Everything compiles and the world is happy. However, when I try to create an instance of Enclosing.Inner
as follows, I cannot:
new Enclosing<Integer>.Inner(5);
The following error has occurred:
Cannot assign element type Enclosing<Integer>.Inner
using a parameterized connection name; use its simple name and the attached instance of type Enclosing<Integer>
.
It is important to note that I cannot make the inner class static
because it contains a field of type T
How can I get around this?
source share