Java generics - How to read it: Foo <T extends Bar <? extends Foo <T> >>?

I am updating Java generators (working for a long time on legacy code with JDK 1.4 ... 1.3), and I do not quite understand this:

public class Foo<T extends Bar<? extends Foo<T>>> { ...

Where Fooand Barare two common classes.

How to understand this, because I did not quite understand?

I read a lot about Java generics, but it's a bit flexible mind (at least for me as a beginner).

+3
source share
1 answer

, Foo T. T Bar<U> U, U Foo<T>. ( "extend" " , " .) U , , ?.

, , , , , , , . , .

+4

All Articles