Hi,
> I think the problem (if it is one) is located in:
>
> com.sun.codemodel.JCodeModel#ref(String fullyQualifiedClassName)
>
> If called multiple times with the same fully qualified class name, it
> returns new instances of JDirectClass every time.
> Maybe there should be some kind of Map<String,JDirectClass> be introduced?
Hard to say. Would you mind writing a test to reproduce your case?
Bye.
/lexi