Class mi = ReflectUtils.forName(INTERCEPTOR_NAME, loader); Class[] types = delegating ? new Class[]{ mi, Object.class } : new Class[]{ mi }; Object[] args = delegating ? new Object[]{ ih, obj } : new Object[]{ ih }; factory = (Factory)ReflectUtils.newInstance(gen, types, args);
factory = (Factory)ReflectUtils.newInstance(gen);
    private static Object enhanceHelper(boolean delegating, Object obj, Class cls,                                        Class[] interfaces, MethodInterceptor ih,                                        ClassLoader loader, Method wreplace,                                        MethodFilter filter) {        if (ih == null) {            throw new IllegalArgumentException("MethodInterceptor is null");        }        if (cls == null) {            if (obj == null) {                cls = Object.class;            } else {                cls = obj.getClass();            }        }        if (loader == null) {            loader = defaultLoader;        }        Object key = keyFactory.newInstance(cls, interfaces, wreplace, delegating, filter);        Factory factory;        synchronized (cache) {            factory = (Factory)cache.get(loader, key);            if (factory == null) {                Class gen = enhanceClassHelper(delegating, cls, interfaces, loader, wreplace, filter);                Class mi = ReflectUtils.forName(INTERCEPTOR_NAME, loader);                Class[] types = delegating ? new Class[]{ mi, Object.class } : new Class[]{ mi };                Object[] args = delegating ? new Object[]{ ih, obj } : new Object[]{ ih };                factory = (Factory)ReflectUtils.newInstance(gen, types, args);                cache.put(loader, key, factory);            }        }        if (delegating) {            return factory.newInstance(ih, obj);        } else {            return factory.newInstance(ih);        }    }