public static DozerPropertyDescriptor getPropertyDescriptor(Class<?> clazz, ClassMap classMap, DozerField src, DozerField dest) { if (MappingUtils.isBlankOrNull(src.getName())) { return new EmptyFieldPropertyDescriptor(); } LOG.info("clazz = " + clazz.getName()); LOG.info("src.getTheGetMethod() = " + src.getTheGetMethod()); LOG.info("src.getTheSetMethod() = " + src.getTheSetMethod()); LOG.info("src.getMapGetMethod() = " + src.getMapGetMethod()); LOG.info("src.getMapSetMethod() = " + src.getMapSetMethod()); LOG.info("src.isAccessible() = " + src.isAccessible()); LOG.info("src.isIndexed() = " + src.isIndexed()); LOG.info("src.getIndex() = " + src.getIndex()); LOG.info("src.getName() = " + src.getName()); LOG.info("src.getKey() = " + src.getKey()); LOG.info("src.isSelfReferenced() = " + src.isSelfReferenced()); LOG.info("src.getName() = " + src.getName()); LOG.info("src.getDeepIndexHintContainer() = " + src.getDeepIndexHintContainer()); LOG.info("classMap.getDestClassBeanFactory() = " + classMap.getDestClassBeanFactory()); return getPropertyDescriptor(clazz, src.getTheGetMethod(), src.getTheSetMethod(), src.getMapGetMethod(), src.getMapSetMethod(), src.isAccessible(), src.isIndexed(), src.getIndex(), src.getName(), src .getKey(), src.isSelfReferenced(), src.getName(), src.getDeepIndexHintContainer(), classMap.getDestClassBeanFactory()); }
} catch (Exception e) { if (fieldMap.getClassMap().getDestClassBeanFactory() != null) { o = DestBeanCreator.create(new BeanCreationDirective(null, fieldMap.getClassMap().getSrcClassToMap(), clazz, clazz, fieldMap.getClassMap() .getDestClassBeanFactory(), fieldMap.getClassMap().getDestClassBeanFactoryId(), null)); } else { MappingUtils.throwMappingException(e);
classMap.getDestClassBeanFactory(), classMap.getDestClassBeanFactoryId(), classMap.getDestClassCreateMethod());
LOG.info("src.getName() = " + src.getName()); LOG.info("src.getDeepIndexHintContainer() = " + src.getDeepIndexHintContainer()); LOG.info("classMap.getDestClassBeanFactory() = " + classMap.getDestClassBeanFactory()); src.getName(), src.getDeepIndexHintContainer(), classMap.getDestClassBeanFactory());
classMap.getDestClassToMap(), destType, classMap.getDestClassBeanFactory(), classMap .getDestClassBeanFactoryId(), classMap.getDestClassCreateMethod()));
protected DozerPropertyDescriptor getDestPropertyDescriptor(Class<?> runtimeDestClass) { if (BeanBuilder.class.isAssignableFrom(runtimeDestClass)) { MappingUtils.throwMappingException( "getDestPropertyDescriptor received builder instead of concrete class - it's a bug, please post stack trace at https://github.com/DozerMapper/dozer or directly to dmitry@spikhalskiy.com "); return null; } DozerPropertyDescriptor result = this.destPropertyDescriptorMap.get(runtimeDestClass); if (result == null) { DozerPropertyDescriptor descriptor = PropertyDescriptorFactory.getPropertyDescriptor(runtimeDestClass, getDestFieldTheGetMethod(), getDestFieldTheSetMethod(), getDestFieldMapGetMethod(), getDestFieldMapSetMethod(), isDestFieldAccessible(), isDestFieldIndexed(), getDestFieldIndex(), getDestFieldName(), getDestFieldKey(), isDestSelfReferencing(), getSrcFieldName(), getSrcDeepIndexHintContainer(), getDestDeepIndexHintContainer(), classMap.getDestClassBeanFactory()); this.destPropertyDescriptorMap.putIfAbsent(runtimeDestClass, descriptor); result = descriptor; } return result; }
if (fieldMap.getClassMap().getDestClassBeanFactory() != null) { o = DestBeanCreator.create(null, new BeanCreationDirective(null, clazz, clazz, fieldMap.getClassMap().getDestClassBeanFactory(), fieldMap.getClassMap().getDestClassBeanFactoryId(), null));
public DozerPropertyDescriptor getDestPropertyDescriptor(Class<?> runtimeDestClass) { DozerPropertyDescriptor result = this.destPropertyDescriptorMap.get(runtimeDestClass); if (result == null) { DozerPropertyDescriptor descriptor = PropertyDescriptorFactory.getPropertyDescriptor(runtimeDestClass, getDestFieldTheGetMethod(), getDestFieldTheSetMethod(), getDestFieldMapGetMethod(), getDestFieldMapSetMethod(), isDestFieldAccessible(), isDestFieldIndexed(), getDestFieldIndex(), getDestFieldName(), getDestFieldKey(), isDestSelfReferencing(), getSrcFieldName(), getDestDeepIndexHintContainer(), classMap.getDestClassBeanFactory()); this.destPropertyDescriptorMap.putIfAbsent(runtimeDestClass, descriptor); result = descriptor; } return result; }
classMap.getDestClassToMap(), destType, classMap.getDestClassBeanFactory(), classMap.getDestClassBeanFactoryId(), classMap.getDestClassCreateMethod()));
@Override public DozerPropertyDescriptor getDestPropertyDescriptor(Class<?> runtimeDestClass) { DozerPropertyDescriptor result = getDestPropertyDescriptorMap().get(runtimeDestClass); if (result == null) { DozerPropertyDescriptor descriptor = PropertyDescriptorFactory.getPropertyDescriptor(runtimeDestClass, getDestFieldTheGetMethod(), getDestFieldTheSetMethod(), getDestFieldMapGetMethod(), getDestFieldMapSetMethod(), isDestFieldAccessible(), isDestFieldIndexed(), getDestFieldIndex(), getDestFieldName(), getDestFieldKey(), isDestSelfReferencing(), getSrcFieldName(), getDestDeepIndexHintContainer(), getClassMap().getDestClassBeanFactory()); getDestPropertyDescriptorMap().putIfAbsent(runtimeDestClass, descriptor); result = descriptor; } return result; }
if (fieldMap.getClassMap().getDestClassBeanFactory() != null) { o = DestBeanCreator.create(null, new BeanCreationDirective(null, fieldMap.getClassMap() .getSrcClassToMap(), clazz, clazz, fieldMap.getClassMap().getDestClassBeanFactory(), fieldMap.getClassMap().getDestClassBeanFactoryId(), null)); } else {
public DozerPropertyDescriptor getDestPropertyDescriptor(Class<?> runtimeDestClass) { DozerPropertyDescriptor result = this.destPropertyDescriptorMap.get(runtimeDestClass); if (result == null) { DozerPropertyDescriptor descriptor = PropertyDescriptorFactory.getPropertyDescriptor(runtimeDestClass, getDestFieldTheGetMethod(), getDestFieldTheSetMethod(), getDestFieldMapGetMethod(), getDestFieldMapSetMethod(), isDestFieldAccessible(), isDestFieldIndexed(), getDestFieldIndex(), getDestFieldName(), getDestFieldKey(), isDestSelfReferencing(), getSrcFieldName(), getDestDeepIndexHintContainer(), classMap.getDestClassBeanFactory()); this.destPropertyDescriptorMap.putIfAbsent(runtimeDestClass, descriptor); result = descriptor; } return result; }
destFieldType, classMap.getDestClassBeanFactory(), classMap.getDestClassBeanFactoryId(), fieldMap.getDestFieldCreateMethod() != null ? fieldMap.getDestFieldCreateMethod() : classMap.getDestClassCreateMethod());
@Override public DozerPropertyDescriptor getDestPropertyDescriptor(Class<?> runtimeDestClass) { DozerPropertyDescriptor result = getDestPropertyDescriptorMap().get(runtimeDestClass); if (result == null) { DozerPropertyDescriptor descriptor = PropertyDescriptorFactory.getPropertyDescriptor(runtimeDestClass, getDestFieldTheGetMethod(), getDestFieldTheSetMethod(), getDestFieldMapGetMethod(), getDestFieldMapSetMethod(), isDestFieldAccessible(), isDestFieldIndexed(), getDestFieldIndex(), getDestFieldName(), getDestFieldKey(), isDestSelfReferencing(), getSrcFieldName(), getDestDeepIndexHintContainer(), getClassMap().getDestClassBeanFactory()); getDestPropertyDescriptorMap().putIfAbsent(runtimeDestClass, descriptor); result = descriptor; } return result; }
classMap.getDestClassToMap(), destFieldType, classMap.getDestClassBeanFactory(), classMap .getDestClassBeanFactoryId(), fieldMap.getDestFieldCreateMethod() != null ? fieldMap .getDestFieldCreateMethod() : classMap.getDestClassCreateMethod()));
classMap.getDestClassToMap(), destFieldType, classMap.getDestClassBeanFactory(), classMap.getDestClassBeanFactoryId(), fieldMap.getDestFieldCreateMethod() != null ? fieldMap.getDestFieldCreateMethod()
public static void reverseFields(ClassMap source, ClassMap destination) { // reverse the fields destination.setSrcClass(new DozerClass(source.getDestClassName(), source.getDestClassToMap(), source.getDestClassBeanFactory(), source.getDestClassBeanFactoryId(), source.getDestClassMapGetMethod(), source.getDestClassMapSetMethod(), source.getDestClass().getCreateMethod(), source.isDestMapNull(), source.isDestMapEmptyString(), source.getDestClass().isAccesible())); destination.setDestClass(new DozerClass(source.getSrcClassName(), source.getSrcClassToMap(), source.getSrcClassBeanFactory(), source.getSrcClassBeanFactoryId(), source.getSrcClassMapGetMethod(), source.getSrcClassMapSetMethod(), source.getSrcClass().getCreateMethod(), source.isSrcMapNull(), source.isSrcMapEmptyString(), source.getSrcClass().isAccesible())); destination.setType(source.getType()); destination.setWildcard(source.isWildcard()); destination.setTrimStrings(source.isTrimStrings()); destination.setDateFormat(source.getDateFormat()); destination.setRelationshipType(source.getRelationshipType()); destination.setStopOnErrors(source.isStopOnErrors()); destination.setAllowedExceptions(source.getAllowedExceptions()); destination.setSrcClassCreateMethod(source.getDestClassCreateMethod()); destination.setDestClassCreateMethod(source.getSrcClassCreateMethod()); if (StringUtils.isNotEmpty(source.getMapId())) { destination.setMapId(source.getMapId()); } }
destination.setSrcClass(new DozerClass(source.getDestClassName(), source.getDestClassToMap(), source.getDestClassBeanFactory(), source.getDestClassBeanFactoryId(), source.getDestClassMapGetMethod(), source.getDestClassMapSetMethod(), source.getDestClass().getCreateMethod(),
source.getDestClassBeanFactory(), source.getDestClassBeanFactoryId(), source.getDestClassMapGetMethod(),