|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.batch.item.file.transform.AbstractLineTokenizer
public abstract class AbstractLineTokenizer
Abstract class handling common concerns of various LineTokenizer
implementations such as dealing with names and actual construction of
FieldSet
| Field Summary | |
|---|---|
protected String[] |
names
|
| Constructor Summary | |
|---|---|
AbstractLineTokenizer()
|
|
| Method Summary | |
|---|---|
protected abstract List<String> |
doTokenize(String line)
|
boolean |
hasNames()
|
protected boolean |
isStrict()
Provides access to the strict flag for subclasses if needed. |
void |
setFieldSetFactory(FieldSetFactory fieldSetFactory)
Factory for FieldSet instances. |
void |
setNames(String[] names)
Setter for column names. |
void |
setStrict(boolean strict)
Public setter for the strict flag. |
FieldSet |
tokenize(String line)
Yields the tokens resulting from the splitting of the supplied line. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String[] names
| Constructor Detail |
|---|
public AbstractLineTokenizer()
| Method Detail |
|---|
public void setStrict(boolean strict)
Range, columns, etc.) in LineTokenizer.
If false then lines with less tokens will be tolerated and padded with
empty columns, and lines with more tokens will
simply be truncated.
strict - the strict flag to setprotected boolean isStrict()
public void setFieldSetFactory(FieldSetFactory fieldSetFactory)
FieldSet instances. Can be injected by clients to
customize the default number and date formats.
fieldSetFactory - the FieldSetFactory to setpublic void setNames(String[] names)
names - public boolean hasNames()
true if column names have been specifiedsetNames(String[])public FieldSet tokenize(String line)
line.
tokenize in interface LineTokenizerline - the line to be tokenised (can be null)
protected abstract List<String> doTokenize(String line)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||