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)"
<[EMAIL PROTECTED]>
To: "Avalon Developers List" <[EMAIL PROTECTED]>
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:[EMAIL PROTECTED]
>
> And the container would use the private, no-args constructor?  Interesting
> idea...
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to