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