类 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-phaseLineMapper
implementation consisting of tokenization of the line intoFieldSet
followed by mapping to item. If finer grained control of exceptions is needed, theLineMapper
interface should be implemented directly.- 作者:
- Robert Kasanicky, Lucas Ward
构造器概要
构造器 构造器 说明 DefaultLineMapper()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
afterPropertiesSet()
T
mapLine(java.lang.String line, int lineNumber)
Implementations must implement this method to map the provided line to the parameter type T.void
setFieldSetMapper(FieldSetMapper<T> fieldSetMapper)
void
setLineTokenizer(LineTokenizer tokenizer)
构造器详细资料
DefaultLineMapper
public DefaultLineMapper()
方法详细资料
mapLine
public T mapLine(java.lang.String line, int lineNumber) throws java.lang.Exception
从接口复制的说明:LineMapper
Implementations 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