public BeanDefinition toInternal(BeanDefinitionInfo beanDefinitionInfo) {
		if (beanDefinitionInfo instanceof GenericBeanDefinitionInfo) {
			GenericBeanDefinitionInfo genericInfo = (GenericBeanDefinitionInfo) beanDefinitionInfo;
			GenericBeanDefinition def = new GenericBeanDefinition();
			def.setBeanClassName(genericInfo.getClassName());
			if (genericInfo.getPropertyValues() != null) {
				MutablePropertyValues propertyValues = new MutablePropertyValues();
				for (Entry<String, BeanMetadataElementInfo> entry : genericInfo.getPropertyValues().entrySet()) {
					BeanMetadataElementInfo info = entry.getValue();
					propertyValues.add(entry.getKey(), toInternal(info));
				}
				def.setPropertyValues(propertyValues);
			}
			return def;
		} else if (beanDefinitionInfo instanceof ObjectBeanDefinitionInfo) {
			ObjectBeanDefinitionInfo objectInfo = (ObjectBeanDefinitionInfo) beanDefinitionInfo;
			return createBeanDefinitionByIntrospection(objectInfo.getObject());
		} else {
			throw new IllegalArgumentException("Conversion to internal of " + beanDefinitionInfo.getClass().getName()
					+ " not implemented");
		}
	}
public BeanDefinition toInternal ( BeanDefinitionInfo beanDefinitionInfo ) { if ( beanDefinitionInfo instanceof GenericBeanDefinitionInfo ) { GenericBeanDefinitionInfo genericInfo = ( GenericBeanDefinitionInfo ) beanDefinitionInfo ; GenericBeanDefinition def = new GenericBeanDefinition ( ) ; def . setBeanClassName ( genericInfo . getClassName ( ) ) ; if ( genericInfo . getPropertyValues ( ) != null ) { MutablePropertyValues propertyValues = new MutablePropertyValues ( ) ; for ( Entry < String , BeanMetadataElementInfo > entry : genericInfo . getPropertyValues ( ) . entrySet ( ) ) { BeanMetadataElementInfo info = entry . getValue ( ) ; propertyValues . add ( entry . getKey ( ) , toInternal ( info ) ) ; } def . setPropertyValues ( propertyValues ) ; } return def ; } else if ( beanDefinitionInfo instanceof ObjectBeanDefinitionInfo ) { ObjectBeanDefinitionInfo objectInfo = ( ObjectBeanDefinitionInfo ) beanDefinitionInfo ; return createBeanDefinitionByIntrospection ( objectInfo . getObject ( ) ) ; } else { throw new IllegalArgumentException ( "Conversion to internal of " + beanDefinitionInfo . getClass ( ) . getName ( ) + " not implemented" ) ; } }
Convert from a DTO to an internal Spring bean definition.

@param beanDefinitionDto The DTO object.
@return Returns a Spring bean definition.