Type base = Type.getType(type);
    public FastClassEmitter(ClassVisitor v, String className, Class type) {        super(v);              begin_class(Constants.V1_2, Constants.ACC_PUBLIC, className, FAST_CLASS, null, Constants.SOURCE_FILE);        // constructor        CodeEmitter e = begin_method(Constants.ACC_PUBLIC, CSTRUCT_CLASS, null, null);        e.load_this();        e.load_args();        e.super_invoke_constructor(CSTRUCT_CLASS);        e.return_value();        e.end_method();        VisibilityPredicate vp = new VisibilityPredicate(type, false);        List methods = ReflectUtils.addAllMethods(type, new ArrayList());        CollectionUtils.filter(methods, vp);        CollectionUtils.filter(methods, new DuplicatesPredicate());        List constructors = new ArrayList(Arrays.asList(type.getDeclaredConstructors()));        CollectionUtils.filter(constructors, vp);                // getIndex(String)        emitIndexBySignature(methods);        // getIndex(String, Class[])        emitIndexByClassArray(methods);                // getIndex(Class[])        e = begin_method(Constants.ACC_PUBLIC, CONSTRUCTOR_GET_INDEX, null, null);        e.load_args();        List info = CollectionUtils.transform(constructors, MethodInfoTransformer.getInstance());        EmitUtils.constructor_switch(e, info, new GetIndexCallback(e, info));        e.end_method();        // invoke(int, Object, Object[])        e = begin_method(Constants.ACC_PUBLIC, INVOKE, INVOCATION_TARGET_EXCEPTION_ARRAY, null);        e.load_arg(1);        e.checkcast(Type.getType(type));        e.load_arg(0);        invokeSwitchHelper(e, methods, 2);        e.end_method();        // newInstance(int, Object[])        e = begin_method(Constants.ACC_PUBLIC, NEW_INSTANCE, INVOCATION_TARGET_EXCEPTION_ARRAY, null);        e.new_instance(Type.getType(type));        e.dup();        e.load_arg(0);        invokeSwitchHelper(e, constructors, 1);        e.end_method();        // getMaxIndex()        e = begin_method(Constants.ACC_PUBLIC, GET_MAX_INDEX, null, null);        e.push(methods.size() - 1);        e.return_value();        e.end_method();        end_class();    }