类 DefaultLineMapper<T>
- java.lang.Object
- org.springframework.batch.item.file.mapping.DefaultLineMapper<T>
- 类型参数:
T- type of the item
- 所有已实现的接口:
LineMapper<T>,org.springframework.beans.factory.InitializingBean
public class DefaultLineMapper<T> extends java.lang.Object implements LineMapper<T>, org.springframework.beans.factory.InitializingBean
Two-phaseLineMapperimplementation consisting of tokenization of the line intoFieldSetfollowed by mapping to item. If finer grained control of exceptions is needed, theLineMapperinterface should be implemented directly.- 作者:
- Robert Kasanicky, Lucas Ward
构造器概要
构造器 构造器 说明 DefaultLineMapper()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidafterPropertiesSet()TmapLine(java.lang.String line, int lineNumber)Implementations must implement this method to map the provided line to the parameter type T.voidsetFieldSetMapper(FieldSetMapper<T> fieldSetMapper)voidsetLineTokenizer(LineTokenizer tokenizer)
构造器详细资料
DefaultLineMapper
public DefaultLineMapper()
方法详细资料
mapLine
public T mapLine(java.lang.String line, int lineNumber) throws java.lang.Exception
从接口复制的说明:LineMapperImplementations must implement this method to map the provided line to the parameter type T. The line number represents the number of lines into a file the current line resides.- 指定者:
mapLine在接口中LineMapper<T>- 参数:
line- to be mappedlineNumber- of the current line- 返回:
- mapped object of type T
- 抛出:
java.lang.Exception- if error occurred while parsing.
setLineTokenizer
public void setLineTokenizer(LineTokenizer tokenizer)
setFieldSetMapper
public void setFieldSetMapper(FieldSetMapper<T> fieldSetMapper)
afterPropertiesSet
public void afterPropertiesSet()
- 指定者:
afterPropertiesSet在接口中org.springframework.beans.factory.InitializingBean