I stand corrected -- and thanks for the link; I've never seen this
documented before. Very interesting...
L.
[EMAIL PROTECTED] wrote:
Those are all good points, but when my collection was expressly declared to
be a MapString, Employee I would sort of expect the key to be a String!
When the framework guesses for a different type (feature?) and your
application fails; all the discussion about valid number systems is sort of
AFAIK, OGNL does not have any support for generics, but even if it
would support it, I would prefer that it wont be too smart, for
example in:
s:property value=aMap[abc].id/
I prefer that abc be treated as an action property and call method
getAbc() than coerce it to the string 'abc'.
2008/9/23
I agree totally! If the TypeDeterminer had called getEmployees() which it
clearly did for iterator *and* had bothered to glean the generic type of
the key, it would have recognized the action expected the key to of type
String. If the data type is specifically spelled out and the framework
I agree too.
2008/9/23 stanlick [EMAIL PROTECTED]:
I agree totally! If the TypeDeterminer had called getEmployees() which it
clearly did for iterator *and* had bothered to glean the generic type of
the key, it would have recognized the action expected the key to of type
String. If the data
Sounds reasonable until you remember two words: type erasure. There is
no way to 'glean the generic type' of a collection at runtime.
L.
Gabriel Belingueres wrote:
I agree too.
2008/9/23 stanlick [EMAIL PROTECTED]:
I agree totally! If the TypeDeterminer had called getEmployees() which it
http://www.google.com/gwt/n?eosr=onq=Reflection+generics+Java+source=mhl=enei=ZWfZSODxI5nYqAKR1t53sa=Xoi=blendedct=rescd=4rd=1u=http%3A%2F%2Ftutorials.jenkov.com%2Fjava-reflection%2Fgenerics.html
On 9/23/08, Laurie Harper [EMAIL PROTECTED] wrote:
Sounds reasonable until you remember two words:
Interesting. Seems it is a feature, as documented in [1].
Tested it myself:
s:property value=1234h.class.name /
s:property value=1234b.class.name /
s:property value=1234F.class.name /
s:property value=1234L.class.name /
s:property value=1234d.class.name /
s:property value=(1234).class.name /
The
I don't know but I hope not, since I don't want my expressions to
reduce to different data types depending if there is a number or not
in them!
Even if abc would reduce to the string 'abc', the expression 0xabc
reduce to an Integer (have tested it), since it is an hexadecimal
number.
2008/9/22
9 matches
Mail list logo