Jody Garnett ha scritto: > Andrea Aime wrote: >>> Now if you guys want to fake it ... >>> Integer.class - is lax >>> Integer.Type.getClass() - is strict >> I don't understand what this is. Integer.TYPE is a field that >> represent int.class, int.class.getClass() is just... java.lang.Class. > Right - I am being evil. It is a hack; there are two ways to represent > an Integer (and two Class instances that represent Integer). I am > talking about using one of each ... > - Integer is a bit more lax (it can be null) use it to represent the > case where you want the expression to try really hard to make you an > Integer, but if it cannot manage it have it return null > - "int" (ie Integer.TYPE) is less relaxed - use it to represent the case > where the result must be an integer or it is worth throwing an exception > > Andrea this was not a very serious suggestion; the serious suggestion > would be to turn your problem around and use something other than Class > to describe what you want an expression to give you.
This does not lead me much further... me and Justin already suggested to add a lax flag to the converters, which is "something other than Class" in a manner of speaking... Cheres Andrea ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
