RE: Re: [picocontainer-dev] Chg 4832 - Generic collections process like arrays do now.
Jörg Schaible <[email protected]> Mon, 7 Jul 2008 14:19:38 +0200
| Newsgroups | gmane.comp.java.picocontainer.devel |
|---|---|
| Message-ID | <[email protected]> |
Mauro Talevi wrote:
> Paul Hammant wrote:
>> Paired with Pete yesterday, a change to Parameter has allowed
>> components to have generic collections as a declared injectable.
>>
>> We're at a crossroads though, there are three methods in Parameter
>> that need to change somehow:
>>
>> Object resolveInstance(PicoContainer container, ComponentAdapter
>> adapter, Class expectedType ...etc
>> boolean isResolvable(PicoContainer container, ComponentAdapter
>> adapter, Class expectedType ...etc
>> void verify(PicoContainer container, ComponentAdapter adapter,
>> Class expectedType ...etc
>>
>> We could change the third param to Type from Class
>>
>> Object resolveInstance(PicoContainer container, ComponentAdapter
>> adapter, Type expectedType ...etc
>> boolean isResolvable(PicoContainer container, ComponentAdapter
>> adapter, Type expectedType ...etc
>> void verify(PicoContainer container, ComponentAdapter adapter,
>> Type expectedType ...etc
>>
>
> Type is more generic and makes more sense in JDK1.5+, because
> it is the
> interface that Class implements (so no loss of functionality in
> refactor) but also has as subtype ParameterizedType - which allows to
> distinguish genericized params, eg
> List<Object1> from List<Object2>,
+1
- Jörg
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email