I cannot collect this, and I see no reason. Ultimately, I want to pass a collection of objects whose class extends TClass in the generate method, which accepts a collection of objects whose class extends TClass, This should work.
Any help would be greatly appreciated.
public interface Generator<IT extends ITClass, T extends TClass> { IT generate(Collection<T> tClassCollection) } Generator<?, ? extends TClass> generator = generatorClass.newInstance(); Collection<? extends TClass> TClassCollection = ...
... generator.generate(TClassCollection);
I get this error
The method generate(Collection<capture#8-of ? extends TClass>) in the type Generator<capture#7-of ?,capture#8-of ? extends TClass> is not applicable for the arguments (Collection<capture#9-of ? extends TClass>)
source share