BeanIO 2.0.4

org.beanio.internal.compiler.flat
Class FlatPreprocessor

java.lang.Object
  extended by org.beanio.internal.compiler.ProcessorSupport
      extended by org.beanio.internal.compiler.Preprocessor
          extended by org.beanio.internal.compiler.flat.FlatPreprocessor
Direct Known Subclasses:
FixedLengthPreprocessor

public class FlatPreprocessor
extends Preprocessor

Base class for Preprocessor implementations for flat stream formats (i.e. CSV, delimited, and fixed length).

Since:
2.0
Author:
Kevin Seim

Field Summary
 
Fields inherited from class org.beanio.internal.compiler.Preprocessor
propertyRoot, stream
 
Constructor Summary
FlatPreprocessor(StreamConfig stream)
          Constructs a new FlatPreprocessor.
 
Method Summary
protected  void finalizeRecord(RecordConfig record)
          Finalizes a record configuration after its children have been processed.
protected  void finalizeSegment(SegmentConfig segment)
          Finalizes a segment configuration after its children have been processed.
protected  int getSize(FieldConfig field)
          Returns the size of a field.
protected  void handleField(FieldConfig field)
          Processes a field configuration.
protected  void initializeRecord(RecordConfig record)
          Initializes a record configuration before its children have been processed.
protected  boolean isFixedLength()
          Returns whether the stream format is fixed length.
 
Methods inherited from class org.beanio.internal.compiler.Preprocessor
finalizeGroup, finalizeStream, handleConstant, initializeGroup, initializeSegment, initializeStream, validateRecordIdentifyingCriteria
 
Methods inherited from class org.beanio.internal.compiler.ProcessorSupport
getParent, handleComponent, process
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlatPreprocessor

public FlatPreprocessor(StreamConfig stream)
Constructs a new FlatPreprocessor.

Parameters:
stream -
Method Detail

initializeRecord

protected void initializeRecord(RecordConfig record)
Description copied from class: Preprocessor
Initializes a record configuration before its children have been processed.

Overrides:
initializeRecord in class Preprocessor
Parameters:
record - the record configuration to process

finalizeRecord

protected void finalizeRecord(RecordConfig record)
Description copied from class: Preprocessor
Finalizes a record configuration after its children have been processed.

Overrides:
finalizeRecord in class Preprocessor
Parameters:
record - the record configuration to process

finalizeSegment

protected void finalizeSegment(SegmentConfig segment)
Description copied from class: Preprocessor
Finalizes a segment configuration after its children have been processed.

Overrides:
finalizeSegment in class Preprocessor
Parameters:
segment - the segment configuration to process

handleField

protected void handleField(FieldConfig field)
Description copied from class: Preprocessor
Processes a field configuration.

Overrides:
handleField in class Preprocessor
Parameters:
field - the field configuration to process

getSize

protected int getSize(FieldConfig field)
Returns the size of a field.

Parameters:
field - the field to size
Returns:
the field size

isFixedLength

protected boolean isFixedLength()
Returns whether the stream format is fixed length.

Returns:
true if fixed length, false otherwise

BeanIO 2.0.4

Copyright © 2010-2013 Kevin Seim