Re: Generator - Best way to support custom user extension

2013-12-05 Thread Nicolas Morel
Is it not easier to use the TypeOracle to find CustomFieldSerializer JClassType and get all its subtype with JClassType.getSubtypes() ? This way you can put your custom serializers anywhere with the name you like. I am not 100% sure but I think in older GWT versions a

Generator - Best way to support custom user extension

2013-12-04 Thread Nicolas Morel
Hi, I'm writing a JSON serialization/deserialization mechanism and I'm looking for advices :) Currently, to use it, you do something like : public interface PersonMapper extends ObjectMapperPerson {} PersonMapper mapper = GWT.create(PersonMapper.class); And the library is generating the

Re: Generator - Best way to support custom user extension

2013-12-04 Thread Jens
GWT-RPC does this by convention. The custom serializer must be in the same package as the class it (de)serializes and is named class name_CustomFieldSerializer, e.g. ImmutableSet_CustomFieldSerializer. I wouldn't use an annotation because a guava collection could be used by a large amount of

Re: Generator - Best way to support custom user extension

2013-12-04 Thread Nicolas Morel
Thanks for your answer! GWT-RPC does this by convention. The custom serializer must be in the same package as the class it (de)serializes and is named class name_CustomFieldSerializer, e.g. ImmutableSet_CustomFieldSerializer. Is it not easier to use the TypeOracle to find

Re: Generator - Best way to support custom user extension

2013-12-04 Thread Jens
Is it not easier to use the TypeOracle to find CustomFieldSerializer JClassType and get all its subtype with JClassType.getSubtypes() ? This way you can put your custom serializers anywhere with the name you like. I am not 100% sure but I think in older GWT versions a