The Enum framework is available at www.plotnix.com/enum
It has some very nice qualities:
* Integer or string values of enums, or both
* Enum look-up by the integer value or string value
* Easy access to the complete list of all constants of an enum type
* Internationalization
* The option of automatic assigning sequential integer values to constants
* The option of loading constants from a .properties file
* The option of declaring enums as integer constants
* The "framework" consists of only one class
I would, of course, be happy to contribute it to jakarta-commons if there is
interest.
BTW, I abandoned the idea of using Enum getters/setters on Struts
ActionForms - too much would need to change in BeanUtils and Struts. Back
to strings and explicit conversion to and from Enums inside the ActionForm
or ActionBean.
- Dmitri Plotnikov
[EMAIL PROTECTED]
--- Michael Hackett <[EMAIL PROTECTED]> wrote:
> > Here's my specific problem. I am using an Enum
> > framework that gives me very nice, fully automatic
> > support for Enum types like Gender{Male, Female}.
> It
> > is internationalized, easy to use etc. Each enum
> type
> > is represented by its own class, like
> > "com.plotix.enums.Gender".
>
> Hi Dmitri,
>
> This Enum framework sounds interesting. Is this
> something publicly
> available, or something you or your company has
> developed internally. I
> would like to take a look at it if it is public.
> Could you send me a URL
> or other contact info, if it is?
>
> Thanks,
>
> --
> Michael Hackett
> Developer, Pictorius Inc.
>