|
From: Bill B. <bb...@re...> - 2008-11-21 14:15:35
|
Michael Brackx wrote:
>>> however, the original testcase remains a problem
>>>
>>> @Provider
>>> public static class CompanyConverter extends
>>> ObjectConverter<Company>{..}
>>>
>>> public abstract static class ObjectConverter<T> implements
>>> StringConverter<T>{...}
>>>
>>> How can you get the type in this case?
>>>
>>
>> @Provider
>> public static class CompanyConverter extends ObjectConverter<Company>
>> implements StringConverter<Company> {}
>
> what i was trying to ask was how that could be implemented in java.
> how to get the actual type of T in this case?
>
> Michael Brackx
Hmm, i'm not sure.
You can do CompanyConverter.getGenericSuperclass() to get
ObjectConverter<Company> and find Company that way, but what you really
want is CompanyConverter.getGenericSuperclass()
and from that get the generic interfaces. I'm not sure that will work.
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
|