Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.42!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-1.proxad.net!198.186.194.250.MISMATCH!news-out.readnews.com!news-xxxfer.readnews.com!postnews.google.com!e27g2000vbu.googlegroups.com!not-for-mail From: sclaflin Newsgroups: comp.lang.java.programmer Subject: Hairy generics question Date: Tue, 21 Feb 2012 06:30:51 -0800 (PST) Organization: http://groups.google.com Lines: 36 Message-ID: <3c65271e-a388-49c9-bcc6-ca3bf274e74f@e27g2000vbu.googlegroups.com> NNTP-Posting-Host: 96.227.80.185 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1329834651 14132 127.0.0.1 (21 Feb 2012 14:30:51 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 21 Feb 2012 14:30:51 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e27g2000vbu.googlegroups.com; posting-host=96.227.80.185; posting-account=vdNHJgoAAABDTdTwNMWw7VVYNNqaIOR6 User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALENKRC X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2,gzip(gfe) Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:12232 I have a number of sets of matched parameterized classes: a bean, a presenter, and a view. The presenters and views have parallel inheritance hierarchies (where T is the bean type, P the presenter type, and V is the view type): public class CompA extends CompItem public class CompB extends CompItem public class CompAView extends CompItemView public class CompBView extends CompItemView public class CompItemView, V extends CompItemViewInterface> extends AbstractCompItemView implements CompItemViewInterface public abstract class CompItem, V extends CompItemViewInterface> extends AbstractCompItem implements CompWidget Many of the views are the same, so I wanted to just use the base view class instead of creating a separate view class for each presenter. So I tried: public class CompA extends CompItem But I get an error that says "The type CompItemView is not a valid substitute for the bounded parameter > of the type CompItem. Why can I use a class that extends CompItemView for the V type, and not CompItemView itself?