Class BeanWrapperFieldExtractor<T>
java.lang.Object
org.springframework.batch.item.file.transform.BeanWrapperFieldExtractor<T>
- All Implemented Interfaces:
FieldExtractor<T>
,org.springframework.beans.factory.InitializingBean
public class BeanWrapperFieldExtractor<T>
extends Object
implements FieldExtractor<T>, org.springframework.beans.factory.InitializingBean
This is a field extractor for a java bean. Given an array of property names, it will
reflectively call getters on the item and return an array of all the values.
- Since:
- 2.0
- Author:
- Dan Garrette
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
BeanWrapperFieldExtractor
public BeanWrapperFieldExtractor()
-
-
Method Details
-
setNames
- Parameters:
names
- field names to be extracted by theextract(Object)
method.
-
extract
- Specified by:
extract
in interfaceFieldExtractor<T>
- Parameters:
item
- the object that contains the information to be extracted.- Returns:
- an array containing item's parts
- See Also:
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-