|
RE: How to declare an array signature in this case?: msg#00107java.dwr.user
Hi Joe,
I had a look at the source code and it seems like the
org.directwebremoting.extend.Property hierarchy is making it harder
to handle generic properties in the correct way. As you are only exposing the
raw type from Property, it's hard to use it for looking up actual
types. I see you have worked around this in
BeanConverter.createTypeHintContext by taking the property's exposed
setter method (later using your "getGenericParameterTypesMethod" on it) as this will also reveal the property's actual
type, but this is not possible for ObjectConverter as there is no setter.
As this is a construct of your
own, why not let both BeanConverter and ObjectConverter examine the
Property's actual type? That will avoid the indirect way of having to
examine the setter and will fix the issue with
ObjectConverter...
Everything I say here is of course in the context of
Java5, where you can examine actual generic types. In my opinion this is not so
important to fix for earlier Java versions, especially as that would involve
enhancing signatures.
The fix would either be
to make it possible to create a
TypeHintContext for a field, (not only for a method) from
ObjectConverter.createTypeContext, or to simply let the actual generic type be
sent into convertInbound of BasicObjectConverter's subclasses, and let them do
the inspection themselves...
What do you think about
this?
Best regards
Mike
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Class not found, Saxena, Rahul |
|---|---|
| Next by Date: | Supported Environments - websvr forward to appsvr and changes url, Sarah Haskins |
| Previous by Thread: | RE: How to declare an array signature in this case?, Mike Wilson |
| Next by Thread: | I can't pass parameters to DWR POST request, Francisco González Guillén |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |