]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.databoard/src/org/simantics/databoard/units/ClassUtil.java
Customisation for connection creation
[simantics/platform.git] / bundles / org.simantics.databoard / src / org / simantics / databoard / units / ClassUtil.java
1 package org.simantics.databoard.units;
2
3 import org.objectweb.asm.ClassReader;
4 import org.objectweb.asm.ClassWriter;
5
6 public class ClassUtil {
7
8         /**
9          * Compile multiple classes into one class.
10          * 
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)
18          * 
19          * @param className
20          * @param classes
21          * @return assembly
22          */
23         public static Class<?> assembleClasses(String className, Class<?>...classes)
24         {
25                 //ClassReader cr = new ClassReader();
26                 ClassWriter cw = new ClassWriter(0);
27                 
28                 //cw.visit(V1_6, ACC_PUBLIC + ACC_SUPER, classSig, null, superType, null);
29                 
30                 return null;
31         }
32
33 }