Hi Keith,

At the risk of starting a religious riot, here's another small donation.

When using J2 collection types, it occurred to me that it would be "nicer"
if the DTOs had iterator methods, and not just enumeration methods.  When I
looked, the change turned out to be nearly trivial.  


Regards
Dean


CVS diff follows (based on 0.9.5): 

RCS file:
D:/CvsRepo/Main/castor/src/main/org/exolab/castor/builder/CollectionIn
foJ2.java,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 CollectionInfoJ2.java
198a199,208
>          //---------------------------/
>         //- Create Iterate Method -/
>        //---------------------------/
>
>         method = new JMethod(SGTypes.Iterator, "iterate"+cName);
>         jClass.addMethod(method);
>
>         createIterateMethod(method);
>
>
306a317,332
>
>     /**
>      * Creates implementation of Iterate method.
>      *
>      * @param method the JMethod in which to create the source
>      * code.
>     **/
>     public void createIterateMethod(JMethod method) {
>
>         JSourceCode jsc = method.getSourceCode();
>
>         jsc.add("return ");
>         jsc.append(getName());
>         jsc.append(".iterator();");
>
>     } //-- createIterateMethod

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to