public void generateClass(ClassVisitor v) { switch (style) { case STYLE_INTERFACES: new MixinEmitter(v, getClassName(), classes, route); break; case STYLE_BEANS: new MixinBeanEmitter(v, getClassName(), classes); break; case STYLE_EVERYTHING: new MixinEverythingEmitter(v, getClassName(), classes); break; } }
public MixinEmitter(ClassVisitor v, String className, Class[] classes, int[] route) { super(v); begin_class(Constants.V1_2, Constants.ACC_PUBLIC, className, MIXIN, TypeUtils.getTypes(getInterfaces(classes)), Constants.SOURCE_FILE); EmitUtils.null_constructor(this); EmitUtils.factory_method(this, NEW_INSTANCE); declare_field(Constants.ACC_PRIVATE, FIELD_NAME, Constants.TYPE_OBJECT_ARRAY, null); CodeEmitter e = begin_method(Constants.ACC_PUBLIC, CSTRUCT_OBJECT_ARRAY, null); e.load_this(); e.super_invoke_constructor(); Method[] methods = getMethods(classes[i]); for (int j = 0; j < methods.length; j++) { if (unique.add(MethodWrapper.create(methods[j]))) { end_class();
public MixinEmitter(ClassVisitor v, String className, Class[] classes, int[] route) { super(v); begin_class(Constants.V1_2, Constants.ACC_PUBLIC, className, MIXIN, TypeUtils.getTypes(getInterfaces(classes)), Constants.SOURCE_FILE); EmitUtils.null_constructor(this); EmitUtils.factory_method(this, NEW_INSTANCE); declare_field(Constants.ACC_PRIVATE, FIELD_NAME, Constants.TYPE_OBJECT_ARRAY, null); CodeEmitter e = begin_method(Constants.ACC_PUBLIC, CSTRUCT_OBJECT_ARRAY, null); e.load_this(); e.super_invoke_constructor(); Method[] methods = getMethods(classes[i]); for (int j = 0; j < methods.length; j++) { if (unique.add(MethodWrapper.create(methods[j]))) { end_class();
public void generateClass(ClassVisitor v) { switch (style) { case STYLE_INTERFACES: new MixinEmitter(v, getClassName(), classes, route); break; case STYLE_BEANS: new MixinBeanEmitter(v, getClassName(), classes); break; case STYLE_EVERYTHING: new MixinEverythingEmitter(v, getClassName(), classes); break; } }