avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Hawkes" <jhaw...@adsnm.com>
Subject Re: [RT] Auto-configuring components
Date Fri, 23 Jan 2004 17:28:22 GMT
About your examples...  I'm all for it!

But that is not exactly what Leo was proposing is it?  He was having the
container directly set private fields.


----- Original Message ----- 
From: "Hamilton Verissimo de Oliveira (Engenharia - SPO)"
<hamilton.oliveira@agenciaclick.com.br>
To: "Avalon Developers List" <dev@avalon.apache.org>
Sent: Friday, January 23, 2004 11:20 AM
Subject: Re: [RT] Auto-configuring components


>
> That is quickly becoming a pointless discussion, but the sake of argument
> I'll explain:
>
>
> public class MyComponent {
>
>     private String myField;
>
>     private int myOtherField;
>
>     private MyComponent() {
>     }
>
>     /**
>      * @ConfigurationEntry ("@fieldentrymappingname1")
>      * @ConfigurationEntry ("@fieldentrymappingname2")
>      */
>     public MyComponent(String myField, int myOtherField) {
>         this.myField = myField;
>         this.myOtherField = myOtherField;
>     }
> }
>
>
>   OR
>
>
> public class MyComponent {
>
>     private String myField;
>
>     private int myOtherField;
>
>     public MyComponent() {
>     }
>
>     /**
>      * @ConfigurationEntry ("@fieldentrymappingname1")
>      */
>     public void setField1(String s) {
>       myField = s;
>     }
>
>     /**
>      * @ConfigurationEntry ("@fieldentrymappingname2")
>      */
>     public void setField2(int v) {
>       myOtherField = v;
>     }
> }
>
> Got it? Hope so.
>
> --
> hammett
>
> -----Mensagem original-----
> De: Jonathan Hawkes [mailto:jhawkes@adsnm.com]
>
> And the container would use the private, no-args constructor?  Interesting
> idea...
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
> For additional commands, e-mail: dev-help@avalon.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Mime
View raw message