Is there an implementation that will serialize a Java object as Java code? For example, if I have the object
Map m = new Map
Could you use Clojure instead and integrate it with your Java code? Clojure is homoiconic - its data is identical to its code, so you can do things like this very easily.
Maps are a basic datatype in Clojure.