1 package org.simantics.databoard.units;
3 import org.objectweb.asm.ClassReader;
4 import org.objectweb.asm.ClassWriter;
6 public class ClassUtil {
9 * Compile multiple classes into one class.
11 * The resulted class will:
12 * Implemented all the interfaces as the source classes.
13 * Have same static fields
14 * Run all the source classes' static {} blocks
15 * Contain all the same methods
16 * Inherit the super-type from the first class (1st index)
17 * Include methods of all super-types of other classes (2nd and further indices)
23 public static Class<?> assembleClasses(String className, Class<?>...classes)
25 //ClassReader cr = new ClassReader();
26 ClassWriter cw = new ClassWriter(0);
28 //cw.visit(V1_6, ACC_PUBLIC + ACC_SUPER, classSig, null, superType, null);