java - Missing type arguments for generic class -


using library abstract class a , interfaces i , j, following warning message when extend / implement class / interfaces:

missing type arguments generic class j<t>.

as mwe, classes follows (t , s generic type parameters):

public abstract class {}  public interface i<t extends a> {     public <s extends t> void dostuff(j<? super s> param); }  public interface j<t extends a> {     public void dootherstuff(); } 

here classes:

public class aextended extends {}  public class iimplemented implements i<aextended> {     @override     public void dostuff(j param) {} } 

explicitly using class aextended below not implement dostuff() i:

public class iimplemented implements i<aextended> {     @override     public void dostuff(j<aextended> param) {} } 

you're not overriding dostuff in iimplemented because method not generic , type bounds not present. version of dostuff should work you:

public <s extends aextended> void dostuff(j<? super s> param) {} 

notice since type of i aextended used appropriately here, , lower bound in wildcard type j included.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -