|
From: Michael B. <mic...@gm...> - 2008-11-13 19:15:21
|
some code to make it understandable
public abstract class ObjectStringConverter<T> implements StringConverter<T> {
public String toString(final T value) {
return value.toString();
}
}
public class TypeStringConverter extends ObjectStringConverter<Type>
implements StringConverter<Type> {
public Type fromString(final String value) {
return Type.fromString(value);
}
}
if TypeStringConverter does not implement StringConverter<Type>
direcly, it is not properly registered
what was asking is to allow
public class TypeStringConverter extends ObjectStringConverter<Type> {
public Type fromString(final String value) {
return Type.fromString(value);
}
}
Michael
On Thu, Nov 13, 2008 at 7:53 PM, Bill Burke <bb...@re...> wrote:
> I determine the type from the generic information
>
> public class MyConverter implements StringConverter<MyType>
>
> the implements tells Resteasy that MyConverter convertes MyType.class.
>
> Michael Brackx wrote:
>>
>> Apparently the string converter providers must implement the
>> StringConverter interface directly.
>> I was trying to use an abstract base class implementing StringConverter.
>> Could that be relaxed?
>>
>> Michael Brackx
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win great
>> prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the
>> world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> Resteasy-developers mailing list
>> Res...@li...
>> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
>
|