\> The biggest drawback to anonymous inner classes (as I see it) is that the
> compiler creates a separate class file for each one.  I had a small
> project's .jar file double in size due to these class files (since .jar
> compression is file-by-file).

There certainly needs to be some degree of standardisation on a chunking
mechanism under the jar scheme. I appreciate that it's nice to have pure
compatibility with zip but it's not ideal for large class hierarchies - especially
as one of the aims is brevity of transmission.  I wondered if something like
package level chunking would work well and have the archive directory contain
a packing list indexed to the package chunk.

Another possiblity is to have non-static inner classes loaded with the enclosing
class but not initialised until first use. Then a java bytecode file could contain
all directly dependant classes in one file - no more Class$1.class files and perhaps
a more efficient loading process... Static inner classes of course should probably
still be separate - Does an enclosing class get loaded and initalised when a static
inner class is instanciated?

--
Aaron Scott-Boddendijk
INTAZ Limited
+64 7 838 3371 Voice
+64 7 838 3372 Fax



Reply via email to