users@jaxb.java.net

Re: Accessing enumerations

From: Ryan Shoemaker - JavaSoft East <Ryan.Shoemaker_at_Sun.COM>
Date: Tue, 18 May 2004 12:19:31 -0400

Jon Richards wrote:

> Hi everyone,
>
> In our schemas we quite often use enumerated restrictions with string
> types. Is there any way of getting to them from the JAXB classes?
>

Unfortunately not. I filed an RFE a long time ago for this kind of
functionality and the report contains some workarounds that might be
better than hard coding. Have a look:

http://developer.java.sun.com/developer/bugParade/bugs/4897223.html

--Ryan

> At the moment I'm hard coding static final strings in our code, but of
> course if the schema changes I'll have to remember to change the code
> and that doesn't seem right!
>
> Thanks in advance,
>
> Jon


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net