--- /dev/null
+package org.simantics.databoard.units;\r
+\r
+import org.objectweb.asm.ClassReader;\r
+import org.objectweb.asm.ClassWriter;\r
+\r
+public class ClassUtil {\r
+\r
+ /**\r
+ * Compile multiple classes into one class.\r
+ * \r
+ * The resulted class will:\r
+ * Implemented all the interfaces as the source classes.\r
+ * Have same static fields\r
+ * Run all the source classes' static {} blocks\r
+ * Contain all the same methods\r
+ * Inherit the super-type from the first class (1st index) \r
+ * Include methods of all super-types of other classes (2nd and further indices)\r
+ * \r
+ * @param className\r
+ * @param classes\r
+ * @return assembly\r
+ */\r
+ public static Class<?> assembleClasses(String className, Class<?>...classes)\r
+ {\r
+ //ClassReader cr = new ClassReader();\r
+ ClassWriter cw = new ClassWriter(0);\r
+ \r
+ //cw.visit(V1_6, ACC_PUBLIC + ACC_SUPER, classSig, null, superType, null);\r
+ \r
+ return null;\r
+ }\r
+\r
+}\r