There's no performance advantage to inner classes. As regards JXTemplateGenerator the inner classes in that class are not designed to be reused - and should not be reused without major refactoring.

Carsten Ziegeler wrote:

The following is not a critics, I just want to learn more about Java :)

I noticed that e.g. the SaxBuffer and the different template generators
have a bunch of inner classes (for each sax event type an own class).
Does this have any performance advantage (or any other advantage) over
creating "real" classes for the types?

Ok, one advantage of course is the reduced number of .java files :)

Now, I could imagine that if these were "real" classes, they could be
reused by all the different template generators perhaps. (And as I also need such an implementation, I could reuse it myself :).



Carsten










Reply via email to