You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Radu Preotiuc-Pietro <ra...@bea.com> on 2006/10/16 18:19:26 UTC

RE: Ant-Build-Task: How to take advantage of JDK 1.5 Generics rsp. Enumerations in generated java-code?

That surprises me. Your first example is exactly what your ANT task
should look like and I have confirmed that it works correctly in 2.2.0.
I should note that XMLBeans doesn't generate JDK 1.5 Enumerations, but
only Generics.
 
Radu

________________________________

From: Siegfried Baiz [mailto:baiz@sulzer.de] 
Sent: Monday, September 25, 2006 3:34 AM
To: user@xmlbeans.apache.org
Subject: Ant-Build-Task: How to take advantage of JDK 1.5 Generics rsp.
Enumerations in generated java-code?


Hi All,

I' m using XmlBeans 2.2.0 with Ant-Build-Task.
Is there an example for an Ant-Build-File demonstrating,
how to take advantage of JDK 1.5 Generics 
and/or Enumerations in XMLBeans generated classes?

I' ve tried several Options in my build.xml 
like 
...
        <xmlbean schema="schemas"
            destfile="build/lib/schemas.jar"
            srcgendir="src"  
            javasource="1.5"
            classpathref="xmlbeans.path"
            debug="on"            
            />
...

       <javac srcdir="src"
            destdir="build/classes"
            classpathref="Any.path"
            debug="on"
            source="1.5"
            target="1.5"
            />
...
but in the generated java-files I cannot see any difference to Java 1.4.

- Siggi

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

Re: Ant-Build-Task: How to take advantage of JDK 1.5 Generics rsp. Enumerations in generated java-code?

Posted by Siegfried Baiz <ba...@sulzer.de>.
Hello Radu,

you are right - also I got indeed methods
like java.util.List<XXX> getXXXList();
in addition to XXX[] getXXXArray.

Maybe I focused too much on the Enumerations (which I'm really 
interested in),
so that didn't notice the additional Methods.
Sorry for that - maybe it's because at 
"http://wiki.apache.org/xmlbeans/V2Features"
( section "XMLBeans Version 2 Plans" >> "Specific V2 Objectives")
I read/missunderstood the following notice:

** JDK1.5 Generics and Enumerations **
"XMLBeans V2 will work with both JDK 1.4 and JDK 1.5. V2 will provide the option to take advantage of JDK 1.5 Generics and/or Enumerations in XMLBeans generated classes." 

In any case, thanks a lot for that information!
Do you know if Java-Enumerations will be supported with the next release?

Siggi


        
**




Radu Preotiuc-Pietro schrieb:
> That surprises me. Your first example is exactly what your ANT task 
> should look like and I have confirmed that it works correctly in 
> 2.2.0. I should note that XMLBeans doesn't generate JDK 1.5 
> Enumerations, but only Generics.
>  
> Radu
>
> ------------------------------------------------------------------------
> *From:* Siegfried Baiz [mailto:baiz@sulzer.de]
> *Sent:* Monday, September 25, 2006 3:34 AM
> *To:* user@xmlbeans.apache.org
> *Subject:* Ant-Build-Task: How to take advantage of JDK 1.5 Generics 
> rsp. Enumerations in generated java-code?
>
> Hi All,
>
> I' m using XmlBeans 2.2.0 with Ant-Build-Task.
> Is there an example for an Ant-Build-File demonstrating,
> how to take advantage of JDK 1.5 Generics
> and/or Enumerations in XMLBeans generated classes?
>
> I' ve tried several Options in my build.xml
> like
> ...
>         <xmlbean schema="schemas"
>             destfile="build/lib/schemas.jar"
>             srcgendir="src" 
>             *javasource="1.5"*
>             classpathref="xmlbeans.path"
>             debug="on"           
>             />
> ...
>
>        <javac srcdir="src"
>             destdir="build/classes"
>             classpathref="Any.path"
>             debug="on"
> *            source="1.5"
>             target="1.5"
> *            />
> ...
> but in the generated java-files I cannot see any difference to Java 1.4.
>
> - Siggi
> _______________________________________________________________________
> Notice:  This email message, together with any attachments, may contain
> information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
> entities,  that may be confidential,  proprietary,  copyrighted  and/or
> legally privileged, and is intended solely for the use of the individual
> or entity named in this message. If you are not the intended recipient,
> and have received this message in error, please immediately return this
> by email and then delete it.
>