BeanIO 2.0.4

org.beanio.internal.compiler
Class ProcessorSupport

java.lang.Object
  extended by org.beanio.internal.compiler.ProcessorSupport
Direct Known Subclasses:
ParserFactorySupport, Preprocessor

public abstract class ProcessorSupport
extends Object

A base class for configuration processors. The class provides support for traversing a tree of stream configuration components and generates a "stack trace" if any overridden method throws a BeanIOConfigurationException.

Since:
2.0
Author:
Kevin Seim

Constructor Summary
ProcessorSupport()
          Constructs a new ProcessorSupport.
 
Method Summary
protected  void finalizeGroup(GroupConfig group)
          Finalizes a group configuration after its children have been processed.
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  void finalizeStream(StreamConfig stream)
          Finalizes a stream configuration after its children have been processed.
protected  ComponentConfig getParent()
          Returns the parent component for the component being processed.
protected  void handleComponent(ComponentConfig component)
          Recursively preprocesses a component and its descendants.
protected  void handleConstant(ConstantConfig constant)
          Processes a constant configuration.
protected  void handleField(FieldConfig field)
          Processes a field configuration.
protected  void initializeGroup(GroupConfig group)
          Initializes a group configuration before its children have been processed.
protected  void initializeRecord(RecordConfig record)
          Initializes a record configuration before its children have been processed.
protected  void initializeSegment(SegmentConfig segment)
          Initializes a segment configuration before its children have been processed.
protected  void initializeStream(StreamConfig stream)
          Initializes a stream configuration before its children have been processed.
protected  void process(StreamConfig stream)
          Processes a stream configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessorSupport

public ProcessorSupport()
Constructs a new ProcessorSupport.

Method Detail

process

protected void process(StreamConfig stream)
                throws BeanIOConfigurationException
Processes a stream configuration.

Throws:
BeanIOConfigurationException - if the configuration is invalid

handleComponent

protected void handleComponent(ComponentConfig component)
Recursively preprocesses a component and its descendants.

Parameters:
component - the component to preprocess

getParent

protected ComponentConfig getParent()
Returns the parent component for the component being processed.

Returns:
the parent component, or null if the component does not have a parent

initializeStream

protected void initializeStream(StreamConfig stream)
                         throws BeanIOConfigurationException
Initializes a stream configuration before its children have been processed.

Parameters:
stream - the stream configuration to process
Throws:
BeanIOConfigurationException

finalizeStream

protected void finalizeStream(StreamConfig stream)
                       throws BeanIOConfigurationException
Finalizes a stream configuration after its children have been processed.

Parameters:
stream - the stream configuration to finalize
Throws:
BeanIOConfigurationException

initializeGroup

protected void initializeGroup(GroupConfig group)
                        throws BeanIOConfigurationException
Initializes a group configuration before its children have been processed.

Parameters:
group - the group configuration to process
Throws:
BeanIOConfigurationException

finalizeGroup

protected void finalizeGroup(GroupConfig group)
                      throws BeanIOConfigurationException
Finalizes a group configuration after its children have been processed.

Parameters:
group - the group configuration to finalize
Throws:
BeanIOConfigurationException

initializeRecord

protected void initializeRecord(RecordConfig record)
                         throws BeanIOConfigurationException
Initializes a record configuration before its children have been processed.

Parameters:
record - the record configuration to process
Throws:
BeanIOConfigurationException

finalizeRecord

protected void finalizeRecord(RecordConfig record)
                       throws BeanIOConfigurationException
Finalizes a record configuration after its children have been processed.

Parameters:
record - the record configuration to process
Throws:
BeanIOConfigurationException

initializeSegment

protected void initializeSegment(SegmentConfig segment)
                          throws BeanIOConfigurationException
Initializes a segment configuration before its children have been processed.

Parameters:
segment - the segment configuration to process
Throws:
BeanIOConfigurationException

finalizeSegment

protected void finalizeSegment(SegmentConfig segment)
                        throws BeanIOConfigurationException
Finalizes a segment configuration after its children have been processed.

Parameters:
segment - the segment configuration to process
Throws:
BeanIOConfigurationException

handleField

protected void handleField(FieldConfig field)
                    throws BeanIOConfigurationException
Processes a field configuration.

Parameters:
field - the field configuration to process
Throws:
BeanIOConfigurationException

handleConstant

protected void handleConstant(ConstantConfig constant)
                       throws BeanIOConfigurationException
Processes a constant configuration.

Parameters:
constant - the constant configuration to process
Throws:
BeanIOConfigurationException

BeanIO 2.0.4

Copyright © 2010-2013 Kevin Seim