How to XMLEncode an element of a typesafe enum
Hi,
how can I XMLEncode an element of a typesafe enum (see typesafe enum pattern).
I've tried to implement Serializable and to specify following methods:
private Object writeReplace()throws ObjectStreamException{
return BAR_REPLACE
}
private Object readResolve()throws ObjectStreamException{
return Foo.BAR;
}
But it still complaints that there is no public constructor (which is part of the typesafe enum pattern).
Any suggestions?
Thanks a lot.
Greets
Puce

