
artoria.data.bean.support.SpringCglibBeanMapFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of artoria-extend Show documentation
Show all versions of artoria-extend Show documentation
Artoria is a java technology framework based on the facade pattern.
The newest version!
package artoria.data.bean.support;
import artoria.convert.ConversionService;
import artoria.convert.ConversionUtils;
import artoria.data.bean.BeanMap;
import artoria.data.bean.BeanMapFactory;
import artoria.util.Assert;
/**
* The spring cglib bean map factory.
* @author Kahle
*/
public class SpringCglibBeanMapFactory implements BeanMapFactory {
private final ConversionService conversionService;
public SpringCglibBeanMapFactory() {
this(ConversionUtils.getConversionService());
}
public SpringCglibBeanMapFactory(ConversionService conversionService) {
Assert.notNull(conversionService, "Parameter \"conversionService\" must not null. ");
this.conversionService = conversionService;
}
@Override
public BeanMap getInstance(Object bean) {
SpringCglibBeanMap beanMap = new SpringCglibBeanMap(conversionService);
if (bean != null) { beanMap.setBean(bean); }
return beanMap;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy