5 Strings do not have to be written together, they can be written as soon as
6 possible (say when there is no current output). The only issue would be that
7 strings could not be sorted for binary lookup. However in general strings are
8 going to need to be imported so that constants are equal with extra classes
13 Well, `Writer.lock` is not `final`, that seems like a mistake. Also the CLDC
14 one is not `Flushable` although it has a `flush` method.
18 Actually, the imports for certain things can be flagged for simplicity. For
19 example if I write to a field I can mark it as read. However, if the field
20 ends up really being `final` (meaning the class changed) then it can fail at
21 import resolution time.
25 The same can be done for super and interfaces.
29 The namespace writer is getting rather ugly again however.
33 I am thinking far too much into it. One thing that _every_ class has is the
34 constant pool. The constant pool **is the import table**. Anything the class
35 uses refers to the constant pool. It might also be best to have fragmentable
36 classes. For example instead of merging all classes into a single namespace,
37 they can be individually referenced. They would still be executable in memory.
38 So essentially the namespace format would be like a ZIP file so to speak. The
39 class processor for the most part can just define a constant pool and pass it
40 to the writer, which then handles references to the entries in it as such. Then
41 for each method in a class, they refer to a constant pool so to speak. The
42 pool would be a bit smarter having the previously thought about extends and
43 implements flags. Before I just ignored the constant pool, but the information
44 is all there. Also, if I ignore a global string table, although it would cost
45 some more bytes it would in effect make it so classes are stand alone and
46 processed on their own. I would not need to keep a record of strings.
50 It will be similar to ZIP along with using CRCs, but with a different magic
51 number and such. This way it is possible to stream classes rather than using