Re: WO5.4: Generics for objectsWithFetchSpecification ???
Re: WO5.4: Generics for objectsWithFetchSpecification ???
- Subject: Re: WO5.4: Generics for objectsWithFetchSpecification ???
- From: Lachlan Deck <email@hidden>
- Date: Mon, 14 Jan 2008 15:03:11 +1100
On 14/01/2008, at 2:13 PM, Mr. Pierre Frisch wrote:
I am still worried about breaking code.
Sure. Good concern.
I was more looking along the lines of adding a method like:
public NSArray<EOEnterpriseObject>
_enterpriseObjectsWithFetchSpecification(EOFetchSpecification
fetchSpecification, EOEditingContext context)
This method raises an exception at run time if the fetch
specification is raw.
I am not sure if this should be a public method it adds to the API
and is not absolutely required.
The problem here is that <EOEnterpriseObject> doesn't take it's type
from anything and so can't be cast to some subtype without
suppressing warnings. So what purpose would it serve?
It seems to me that EOFetchSpecification needs to be genericised or
this whole thing won't be pretty.
Any comments?
So, to ensure backwards api compatibility how's about this?
@deprecated
public NSArray objectsWithFetchSpecification(EOFetchSpecification
fetchSpec) {...}
public NSArray<T> enterpriseObjectsWithFetchSpecification
(EOFetchSpecification<T> fetchSpec) {...}
public NSArray<NSDictionary<String, ?>>
rawObjectsWithFetchSpecification(EOFetchSpecification fetchSpec) {....}
with regards,
--
Lachlan Deck
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden