Class BeanWrapperFieldExtractor<T>
java.lang.Object
org.springframework.batch.infrastructure.item.file.transform.BeanWrapperFieldExtractor<T>
- All Implemented Interfaces:
FieldExtractor<T>
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
ConstructorsConstructorDescriptionBeanWrapperFieldExtractor(String... names) Create a newBeanWrapperFieldExtractorwith the provided field names. -
Method Summary
-
Constructor Details
-
BeanWrapperFieldExtractor
Create a newBeanWrapperFieldExtractorwith the provided field names.- Parameters:
names- field names to be extracted by theextract(Object)method.- Since:
- 6.0
-
-
Method Details
-
setNames
- Parameters:
names- field names to be extracted by theextract(Object)method.
-
extract
- Specified by:
extractin interfaceFieldExtractor<T>- Parameters:
item- the object that contains the information to be extracted.- Returns:
- an array containing item's parts
-