> 
> -----Original Message-----
> From: WWW [mailto:[EMAIL PROTECTED] On Behalf Of Jochen Wiedmann
> Sent: Monday, August 04, 2003 5:08 AM
> To: Ias
> Cc: [EMAIL PROTECTED]
> 
> Quoting Ias <[EMAIL PROTECTED]>:
> 
> >  I'm pointing not Generics from JSR 14 but varargs, which 
> enables you 
> > to code methods like printf in C. For more details, please download 
> > and look at the early access that will show you some sample 
> codes for that.
> 
> I get it. You mean something like
> 
>     JavaMethod jm;
>     Class c;
>     jm.addLine("return new %c();", c);
> 
> Right? I must admit that this would be syntactically nice, 
> much more readable than the current
> 
>     jm.addLine("return new ", c, "();");
>
Actually varargs in Java exactly do what you want in the above line. 
First, we can integrate a variety of addLine methods of IndentationEngine
into one:
public void addLine(Object... pTokens);

In implementation (i.e. IndentationEngineImpl),
the method can be coded like this:
public void addLine(Object... pTokens)
{
        checkNulls(pTokens);
        addLine(getLevel(), pTokens);
}

Through this way, we can give far more simplicity and flexibility to addLine
since the then-existing addLine methods seem verbose and limited in terms of
the number of arguments.

Of course, you can call addLine(Object... ) by any number of arguments as
you desire, for example,

jm.addLine("if", "(", "true", ")");

> Question is, would this require that the JaxMeJS user has the 
> JSR 14 files or the SDK 1.5?
> 
The early access requires J2SE 1.4.2 for both compiling and running. In
addition, gjc-rt.jar should be included in your vm's bootclasspath. J2SE 1.5
will have all the necessary libraries within itself, so you don't need to
install extra stuffs.

I'm not sure this early access will keep supporting J2SE 1.4 because its
original aim is to provide Java developers to experience new J2SE 1.5
language features. What I can assure you is that J2SE 1.5 is a practical
bottom line for varargs.

> 
> Jochen
> 
> 


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Jaxme-jaxb-dev mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jaxme-jaxb-dev

Reply via email to