Cool! That sounds great.
Eric Pabst
|---------+--------------------------->
| | Dmitri Plotnikov|
| | <[EMAIL PROTECTED]|
| | com> |
| | |
| | 06/18/03 09:24 |
| | AM |
| | Please respond |
| | to "Jakarta |
| | Commons |
| | Developers List"|
| | |
|---------+--------------------------->
>---------------------------------------------------------------------------------------------------------------|
|
|
| To: Jakarta Commons Developers List <[EMAIL PROTECTED]>
|
| cc:
|
| Subject: Re: [Clazz] getFoos and addFoo: property name "foos" or "foo"
|
>---------------------------------------------------------------------------------------------------------------|
To address this issue, Clazz has this mechanism of "aliases". The
plural form is chosen as the basic one and the singular is an alias.
So, if you ask to clazz to iterate its properties, you are going to see
"foos" there. However, if you specifically ask for the property "foo",
it will understand perfectly well.
- Dmitri
--- [EMAIL PROTECTED] wrote:
>
> I could go back and forth on this, but I think that whether the
> singular
> form or plural form is returned, it should be CONSISTENT. I think
> that it
> is easier to implement the singular form since at least one method
> should
> already have it in the singular form. If there are no methods with
> the
> singular form (only getFoos and setFoos), then it would be reasonable
> to
> just have the plural form be a normal property of type List (no
> "extended"
> Clazz functionality would probably be used at all).
>
> Eric Pabst
>
>
>
> |---------+--------------------------->
> | | [EMAIL PROTECTED]|
> | | pro.net |
> | | |
> | | 06/18/03 07:35 |
> | | AM |
> | | Please respond |
> | | to "Jakarta |
> | | Commons |
> | | Developers List"|
> | | |
> |---------+--------------------------->
>
>
>
---------------------------------------------------------------------------------------------------------------|
> |
> |
> | To: [EMAIL PROTECTED]
> |
> | cc:
> |
> | Subject: [Clazz] getFoos and addFoo: property name "foos"
> or "foo" |
>
>
>
---------------------------------------------------------------------------------------------------------------|
>
>
>
>
> --- Weitergeleitete Nachricht / Forwarded Message ---
> Date: Wed, 18 Jun 2003 15:24:35 +0200 (MEST)
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: getFoos and addFoo: property name "foos" or "foo"
>
> > Hi,
> >
> > if I have the following class
> >
> > public class Hrglbrmft {
> > public void addFoo(Bar bar) { ... }
> > public List getFoos() { ... }
> > }
> >
> > should the property returned by Clazz be called "foos" or "foo"?
> >
> > Currently "foos" is returned.
> >
> > Victor
> >
> >
>
>
> ---------------------------------------------------------------------
> 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]
>
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
---------------------------------------------------------------------
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]