public class GenericPojoBeanMapperImpl extends AbstractPojoBeanMapper<Object,Bean> implements GenericPojoBeanMapper
GenericPojoBeanMapperImpl.| Modifier and Type | Field and Description |
|---|---|
private CollectionReflectionUtil |
collectionReflectionUtil |
private PojoDescriptorBuilder |
descriptorBuilder |
private PojoDescriptorBuilderFactory |
descriptorBuilderFactory |
private PojoFactory |
pojoFactory |
| Constructor and Description |
|---|
GenericPojoBeanMapperImpl()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doInitialize()
This method performs the actual
initialization. |
<T> T |
fromBean(Bean bean,
Class<T> type) |
private <T> Object |
fromBeanValue(Bean bean,
T pojo,
Object value,
GenericType<?> type) |
protected CollectionReflectionUtil |
getCollectionReflectionUtil() |
protected PojoDescriptorBuilder |
getDescriptorBuilder() |
protected PojoDescriptorBuilderFactory |
getDescriptorBuilderFactory() |
protected PojoFactory |
getPojoFactory() |
void |
setCollectionReflectionUtil(CollectionReflectionUtil collectionReflectionUtil) |
void |
setDescriptorBuilder(PojoDescriptorBuilder descriptorBuilder) |
void |
setDescriptorBuilderFactory(PojoDescriptorBuilderFactory descriptorBuilderFactory) |
void |
setPojoFactory(PojoFactory pojoFactory) |
<T extends Bean> |
toBean(Object pojo,
T prototype) |
private <T extends Bean> |
toBeanValue(Object pojo,
BeanPrototypeBuilder prototypeBuilder,
T bean,
Object value,
GenericType<?> type) |
getBeanFactory, getBeanPrototypeBuilder, setBeanFactory, setBeanPrototypeBuildercreateLogger, getLoggerdoInitialized, getInitializationState, initializeprivate PojoDescriptorBuilderFactory descriptorBuilderFactory
private PojoDescriptorBuilder descriptorBuilder
private PojoFactory pojoFactory
private CollectionReflectionUtil collectionReflectionUtil
protected void doInitialize()
AbstractComponentinitialization. It is called when AbstractComponent.initialize() is
invoked for the first time. super.AbstractComponent.doInitialize().doInitialize in class AbstractBeanMapper<Object,Bean>protected PojoDescriptorBuilderFactory getDescriptorBuilderFactory()
PojoDescriptorBuilderFactory.@Inject public void setDescriptorBuilderFactory(PojoDescriptorBuilderFactory descriptorBuilderFactory)
descriptorBuilderFactory - is the PojoDescriptorBuilderFactory to Inject.protected PojoDescriptorBuilder getDescriptorBuilder()
PojoDescriptorBuilder instance.public void setDescriptorBuilder(PojoDescriptorBuilder descriptorBuilder)
descriptorBuilder - is the PojoDescriptorBuilder to set.protected PojoFactory getPojoFactory()
PojoFactory instance.@Inject public void setPojoFactory(PojoFactory pojoFactory)
pojoFactory - is the PojoFactory to Inject.protected CollectionReflectionUtil getCollectionReflectionUtil()
CollectionReflectionUtil.@Inject public void setCollectionReflectionUtil(CollectionReflectionUtil collectionReflectionUtil)
collectionReflectionUtil - is the CollectionReflectionUtil to Inject.private <T extends Bean> Object toBeanValue(Object pojo, BeanPrototypeBuilder prototypeBuilder, T bean, Object value, GenericType<?> type)
public <T> T fromBean(Bean bean, Class<T> type)
fromBean in interface PojoBeanMapper<Object,Bean>T - the generic type of the Pojo to map to.bean - the Bean to map.type - the Class reflecting the Pojo to map to.new instance of the given Class with the properties mapped from
the given Bean.private <T> Object fromBeanValue(Bean bean, T pojo, Object value, GenericType<?> type)
Copyright © 2001–2016 mmm-Team. All rights reserved.