On Sep 4, 2008, at 3:01 PM, Mike Schrag wrote:

Yeah, see, that's what I _thought_ but then when I tried to override:

public NSArray<LotCode> lotCodes() ... in my Part class

with

public NSArray<ManufacturedBatch> lotCodes() in my Intermediate class (subclass of Part)
Yes, this is because while ManufacturedBatch is a subclass of LotCode, unlike the case of java arrays, NSArray<ManufacturedBatch> is not a "subclass" of NSArray<LotCode>, so you don't ACTUALLY have covariant return types here. If you were returning a to-one relationship, this would work as expected.


Ah, the wonderful magic of Java!

Chuck


--
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to