Serialize a Java object to Java code?

后端 未结 5 2059
轻奢々
轻奢々 2020-12-31 14:03

Is there an implementation that will serialize a Java object as Java code? For example, if I have the object

Map m = new Map

        
5条回答
  •  别那么骄傲
    2020-12-31 14:46

    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.

提交回复
热议问题