@Test public void generateClassWithSuperclasses() throws IllegalAccessException, InstantiationException { String className = "Teste"; String superClass = p(LOL.class); JiteClass jiteClass = new JiteClass(className, superClass, new String[]{}) {{ defineDefaultConstructor(); }}; Class<?> clazz = new DynamicClassLoader().define(jiteClass); Object o = clazz.newInstance(); assertTrue(o instanceof LOL); }
public void defineDefaultConstructor() { defineDefaultConstructor(ACC_PUBLIC); }
JiteClass implements Opcodes { public void defineDefaultConstructor() { defineDefaultConstructor(ACC_PUBLIC); } }
JiteClass implements Opcodes { public void defineDefaultConstructor() { defineDefaultConstructor(ACC_PUBLIC); } JiteClass(String className);  JiteClass(String className, String[] interfaces);  JiteClass(String className, String superClassName, String[] interfaces); }
JiteClass implements Opcodes { public void defineDefaultConstructor() { defineDefaultConstructor(ACC_PUBLIC); } JiteClass(String className);  JiteClass(String className, String[] interfaces);  JiteClass(String className, String superClassName, String[] interfaces); AnnotationData annotate(Class<?> annotationType); int getAccess(); String getClassName(); String getParentClassName(); String reserveLambda(); void setAccess(int access); void setParentClassName(String parentClassName); void setSourceFile(String sourceFile); void setSourceDebug(String sourceDebug); void addChildClass(JiteClass child); void addChildClass(String innerName, JiteClass child); List<JiteClass> getChildClasses(); void defineMethod(String methodName, int modifiers, String signature, CodeBlock methodBody); FieldDefinition defineField(String fieldName, int modifiers, String signature, Object value); void defineDefaultConstructor(); void defineDefaultConstructor(int access); byte[] toBytes(); void addAnnotation(AnnotationData annotation); byte[] toBytes(JDKVersion version); }
JiteClass implements Opcodes { public void defineDefaultConstructor() { defineDefaultConstructor(ACC_PUBLIC); } JiteClass(String className);  JiteClass(String className, String[] interfaces);  JiteClass(String className, String superClassName, String[] interfaces); AnnotationData annotate(Class<?> annotationType); int getAccess(); String getClassName(); String getParentClassName(); String reserveLambda(); void setAccess(int access); void setParentClassName(String parentClassName); void setSourceFile(String sourceFile); void setSourceDebug(String sourceDebug); void addChildClass(JiteClass child); void addChildClass(String innerName, JiteClass child); List<JiteClass> getChildClasses(); void defineMethod(String methodName, int modifiers, String signature, CodeBlock methodBody); FieldDefinition defineField(String fieldName, int modifiers, String signature, Object value); void defineDefaultConstructor(); void defineDefaultConstructor(int access); byte[] toBytes(); void addAnnotation(AnnotationData annotation); byte[] toBytes(JDKVersion version); static final String[] INTERFACES; }