ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Clinton Begin" <clinton.be...@gmail.com>
Subject Re: Does iBatis use or support Generics ?
Date Sun, 11 Mar 2007 03:24:15 GMT
Well, since Java 5 generics are kind of half baked, we don't really need to
do anything to support them.  Sure, we could make it a little more "warning
friendly", but at the end of the day you'll be no more type safe....

You can do this in Java 5:

    List untyped = new ArrayList();

    // WOW!
    List<String> strings = untyped;

   // Error doesn't happen until you attempt to use the array,
   // no different than old-school casting, but less clear code.
    for(String s : strings) {


On 3/10/07, Gordon Ross <G.Ross@ccw.gov.uk> wrote:
> In the methods such as queryForList, does iBatis support generic Lists ?
> I couldn't see any reference anywhere to say yes or no...

View raw message