org.springframework.batch.item.file.transform
Class BeanWrapperFieldExtractor<T>
java.lang.Object
org.springframework.batch.item.file.transform.BeanWrapperFieldExtractor<T>
- All Implemented Interfaces:
- FieldExtractor<T>, InitializingBean
public class BeanWrapperFieldExtractor<T>
- extends Object
- implements FieldExtractor<T>, 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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BeanWrapperFieldExtractor
public BeanWrapperFieldExtractor()
setNames
public void setNames(String[] names)
- Parameters:
names
- field names to be extracted by the extract(Object)
method.
extract
public Object[] extract(T item)
- Specified by:
extract
in interface FieldExtractor<T>
- Returns:
- an array containing item's parts
- See Also:
FieldExtractor.extract(java.lang.Object)
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSet
in interface InitializingBean
Copyright © 2013 SpringSource. All Rights Reserved.