I have about 55 Java interfaces and 5 abstract classes. Each declaration uses the same set of generic parameters: it lists the approximately 60 declarations so each implementation knows a specific type of each other implementation and substitute this type in method parameters and returns as appropriate. It appears that this (perhaps over)use of generics is causing the compiler to hang. The compiler throws an OutOfMemoryError, but does not appear to terminate.
Considering my circumstance, a code listing comprising even one of these declarations is a little difficult, but a part of a listing might be possible. The interface declarations commonly specify a collection of about five methods, but the use of generics in the declaration increases the size of a source module to about a thousand lines.
Could my case be a case of the compiler actually going into an infinite loop, or should I just give it more memory? It takes about 20 minutes for the OutOfMemoryError exception to be thrown, so I'm concerned that if I just increase the memory given to the compiler by a factor, it will just take that factor longer for the compiler to throw the exception.
I'm using NetBeans as my editor environment, but have been resorting to running the clean/build script as soon as I start NetBeans. I do this because NetBeans quickly becomes unresponsive when it begins to check the syntax of my code after start-up. I'm using Ubuntu 10.4 (I think - I'm writing this from Windows). I have resorted to opening a command line in the Ubuntu environment, running NetBeans as a background process, checking the output and correcting any source code mistakes using gedit, killing and then restarting NetBeans. This appeared to suffice until I found that no more syntax errors were being produced. I don't know how to run the clean/build script from the command line.
Sorry if this question appears vague, but if others could help me then maybe I could be a little more specific.
Thanks for any considered advice.