/* 89 */ Object key = BeanCopier.KEY_FACTORY.newInstance(this.source.getName(), this.target.getName(), this.useConverter);
/* 90 */ return (BeanCopier)super.create(key);
/* */ }
/* */
/* */ public void generateClass(ClassVisitor v) {
/* 94 */ Type sourceType = Type.getType(this.source);
/* 95 */ Type targetType = Type.getType(this.target);
/* 96 */ ClassEmitter ce = new ClassEmitter(v);
/* 97 */ ce.begin_class(46, 1, getClassName(), BeanCopier.BEAN_COPIER, null, "<generated>");
/* */
/* 104 */ EmitUtils.null_constructor(ce);
/* 105 */ CodeEmitter e = ce.begin_method(1, BeanCopier.COPY, null, null);
/* 106 */ PropertyDescriptor[] getters = ReflectUtils.getBeanGetters(this.source);
/* 107 */ PropertyDescriptor[] setters = ReflectUtils.getBeanGetters(this.target);
/* */
/* 109 */ Map names = new HashMap();
/* 110 */ for (int i = 0; i < getters.length; i++) {
/* 111 */ names.put(getters[i].getName(), getters[i]);
/* */ }
/* 113 */ Local targetLocal = e.make_local();
/* 114 */ Local sourceLocal = e.make_local();
/* 115 */ if (this.useConverter) {
/* 116 */ e.load_arg(1);
/* 117 */ e.checkcast(targetType);
/* 118 */ e.store_local(targetLocal);
/* 119 */ e.load_arg(0);
/* 120 */ e.checkcast(sourceType);
/* 121 */ e.store_local(sourceLocal);
/* */ } else {
/* 123 */ e.load_arg(1);
/* 124 */ e.checkcast(targetType);
/* 125 */ e.load_arg(0);
/* 126 */ e.checkcast(sourceType);
/* */ }
/* 128 */ for (int i = 0; i < setters.length; i++) {
/* 129 */ PropertyDescriptor setter = setters[i];
/* 130 */ PropertyDescriptor getter = (PropertyDescriptor)names.get(setter.getName());
/* 131 */ if (getter != null) {
/* 132 */ MethodInfo read = ReflectUtils.getMethodInfo(getter.getReadMethod());
/* 133 */ MethodInfo write = ReflectUtils.getMethodInfo(setter.getWriteMethod());
/* 134 */ if (this.useConverter) {
/* 135 */ Type setterType = write.getSignature().getArgumentTypes()[0];
/* 136 */ e.load_local(targetLocal);
/* 137 */ e.load_arg(2);
/* 138 */ e.load_local(sourceLocal);
/* 139 */ e.invoke(read);
/* 140 */ e.box(read.getSignature().getReturnType());