commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ericpa...@discoverfinancial.com
Subject Re: [Clazz] getFoos and addFoo: property name "foos" or "foo"
Date Wed, 18 Jun 2003 15:26:23 GMT

Cool!  That sounds great.

Eric Pabst



|---------+--------------------------->
|         |           Dmitri Plotnikov|
|         |           <dplotnik@yahoo.|
|         |           com>            |
|         |                           |
|         |           06/18/03 09:24  |
|         |           AM              |
|         |           Please respond  |
|         |           to "Jakarta     |
|         |           Commons         |
|         |           Developers List"|
|         |                           |
|---------+--------------------------->
  >---------------------------------------------------------------------------------------------------------------|
  |                                                                                      
                        |
  |        To:      Jakarta Commons Developers List <commons-dev@jakarta.apache.org>
                             |
  |        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


--- ericpabst@discoverfinancial.com 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
>
>
>
> |---------+--------------------------->
> |         |           victor.volle@gmx|
> |         |           pro.net         |
> |         |                           |
> |         |           06/18/03 07:35  |
> |         |           AM              |
> |         |           Please respond  |
> |         |           to "Jakarta     |
> |         |           Commons         |
> |         |           Developers List"|
> |         |                           |
> |---------+--------------------------->
>
>
>
---------------------------------------------------------------------------------------------------------------|

>   |
>                                             |
>   |        To:      commons-dev@jakarta.apache.org
>                                             |
>   |        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: victor.volle@gmxpro.net
> To: commons-dev@jakarta.apache.org
> 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: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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







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


Mime
View raw message