Nathan Meyers <[EMAIL PROTECTED]> writes:
> Bernd Kreimeier wrote:
> >
> > Does anybody know of a (preferably Java-written - has to
> > work for Win32 too) tool that implements a template-like
> > text replacement for Java? Like the "genclass" script did
> > in the very early days of gcc-based C++?
> >
> > I know that templates are not part of the Java language.
> > It would be handy though to have a simple way to create
> > sources from a template source by just replacing some
> > type and final placeholders.
Sounds like you could do this with just some creative usage of
cpp. E.g. name your template file <..>.javax (with #define and/or
include) and then run cpp to produce a <..>.java source file.
http://www.tildeslash.com/mmake is a very simple make system that
support some of this strategy. It will probably dont hurt to have a
look at it.
Just my 2 cents
> If you're looking for templates, you might want to check out
> "Generic Java", a Java superset that adds templates. Their
> java-based compiler runs either as a compiler or a preprocessor.
>
> Site: http://www.cis.unisa.edu.au/~pizza/gj/
>
> This site also includes "pizza", a first attempt at supporting
> parametric polymorphism. "Gj", the second try, paid much better
> attention to compatibility with existing code. My experience with
> it has been very positive.
>
> Nathan Meyers
> [EMAIL PROTECTED]
--
Jan-Henrik Haukeland