Working with EnumSet class in GWT

Posted by zenmonkey on Stack Overflow See other posts from Stack Overflow or by zenmonkey
Published on 2010-04-04T18:08:16Z Indexed on 2010/04/04 18:13 UTC
Read the original article Hit count: 242

Filed under:

I am having trouble using EnumSet on the client side.

I get this runtime error message:

java.util.EnumSet.EnumSetImpl is not default instantiable (it must have a zero-argument constructor or no constructors at all) and has no custom serializer.

Is this is a known issue?

Here is what I am doing (basically a hello world app)

Service:

String echo (EnumSet<Names> name) throws IllegalArgumentException;

Client:

echoServ.echo (EnumSet.of(Names.JOHN), new AsyncCallback<String>()
{ ....... });

Shared enum class enum Names { JOHN, NUMAN, OBAMA }

© Stack Overflow or respective owner

Related posts about gwt