Re: [picocontainer-dev] ConfigParameterTestCase / ConfigParameter

Paul Hammant <[email protected]>
Newsgroups gmane.comp.java.picocontainer.devel
Message-ID <[email protected]>
Konstantin,

Look in Parmeter interface....

      public interface Parameter {
          Parameter[] ZERO = new Parameter[0];
          Parameter[] DEFAULT = new Parameter[] 
{ ComponentParameter.DEFAULT };
          // etc
     }

We could have an extra constant called say ADAPT_PARAMS or similar  
that could negate the need for newing up ConfigParameter as many  
times as there are params

Also, Ithink we should still keep addConfig(..)  - it means something  
for people that are using pico as a bean, and not leveraging args  
from elsewhere.

- Paul


On Nov 5, 2007, at 10:04 PM, Konstantin Priblouda wrote:

>
> --- Paul Hammant <[email protected]> wrote:
>
>> Konstantin,
>>
>> Yup its very powerful.
>>
>> I was sold on it when i saw the transparent
>> String->File converter :-)
>
> URL will work too ;)  Date/Time would be bit trickier
> though (but this is seldom case in configuration
> parameters)
>
>> However .......
>>
>>                container.addComponent("configured",
>>
>> ExternallyConfiguredComponent.class,
>> 						new ConfigParameter("numericProperty"),
>> 						new ConfigParameter("stringProperty"),
>> 						new ConfigParameter("stringProperty"),
>> 						new ConfigParameter("doubleProperty")
>> 				);
>>
>> ... is not pretty, if its the only way of achieving
>> this.
>>
>> Can you see if you can do ......
>>
>>                container.as
>>
> (Characteristics.ADAPTIVE_PARAMETERS).addComponent("configured",
>>
>> ExternallyConfiguredComponent.class)
>> ... as well as what you have ?
>
> I'll try ;) I have to grok this syntax myself.
>
>> If you can achieve it then I'm happy trimming the
>> bad bits from
>> ArgumentativePicoContainer and merging efforts.
>
> There is actually not much to trim,  but I would say
> that  there is also neet to prune some twigs in MPC
> ( addConfig actually - it becomes pretty useless )
>
>
> Anyway, I recall ( checked with xircles ;) )  that
> Y&#246;rg is on board of xstream -> so we can poke him
>  if we need something.
>
>> Regards,
>>
>> - Paul
> Konstantin
>
> ----[ Konstantin Pribluda http://www.pribluda.de ]----------------
> JTec quality components: http://www.pribluda.de/projects/
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.