Class MapToObjectTransformer
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.transformer.AbstractTransformer
org.springframework.integration.transformer.AbstractPayloadTransformer<Map<?,?>,Object>
  
org.springframework.integration.transformer.MapToObjectTransformer
- All Implemented Interfaces:
- Aware,- BeanFactoryAware,- BeanNameAware,- InitializingBean,- ApplicationContextAware,- ComponentSourceAware,- ExpressionCapable,- GenericTransformer<Message<?>, Message<?>>,- NamedComponent,- Transformer
Will transform Map to an instance of Object. There are two ways to specify the type of the transformed Object.
 You can use one of two constructors. The constructor that takes the Class<?> as an argument will construct the Object of
 that type. There is another constructor that takes a 'beanName' as an argument and will populate this bean with transformed data.
 Such bean must be of 'prototype' scope otherwise 
MessageTransformationException will be thrown.
 This transformer is integrated with the ConversionService allowing values in the Map to be converted
 to types that represent the properties of the Object.- Since:
- 2.0
- Author:
- Oleg Zhurakousky, Artem Bilan
- 
Field SummaryFields inherited from class org.springframework.integration.context.IntegrationObjectSupportEXPRESSION_PARSER, logger
- 
Constructor SummaryConstructorsConstructorDescriptionMapToObjectTransformer(Class<?> targetClass) MapToObjectTransformer(String beanName) 
- 
Method SummaryModifier and TypeMethodDescriptionSubclasses may implement this method to provide component type information.protected voidonInit()Subclasses may implement this for initialization logic.protected ObjecttransformPayload(Map<?, ?> payload) Methods inherited from class org.springframework.integration.transformer.AbstractPayloadTransformerdoTransformMethods inherited from class org.springframework.integration.transformer.AbstractTransformertransformMethods inherited from class org.springframework.integration.context.IntegrationObjectSupportafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentDescription, getComponentName, getComponentSource, getConversionService, getExpression, getIntegrationProperties, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentDescription, setComponentName, setComponentSource, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toString
- 
Constructor Details- 
MapToObjectTransformer- Parameters:
- targetClass- The target class.
 
- 
MapToObjectTransformer- Parameters:
- beanName- The bean name.
 
 
- 
- 
Method Details- 
getComponentTypeDescription copied from class:IntegrationObjectSupportSubclasses may implement this method to provide component type information.- Specified by:
- getComponentTypein interface- NamedComponent
- Overrides:
- getComponentTypein class- IntegrationObjectSupport
 
- 
onInitprotected void onInit()Description copied from class:IntegrationObjectSupportSubclasses may implement this for initialization logic.- Overrides:
- onInitin class- IntegrationObjectSupport
 
- 
transformPayload- Specified by:
- transformPayloadin class- AbstractPayloadTransformer<Map<?,- ?>, - Object> 
 
 
-