Package org.beanio.internal.compiler
Class ProcessorSupport
- java.lang.Object
-
- org.beanio.internal.compiler.ProcessorSupport
-
- Direct Known Subclasses:
ParserFactorySupport,Preprocessor
public abstract class ProcessorSupport extends java.lang.ObjectA 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 aBeanIOConfigurationException.- Since:
- 2.0
-
-
Constructor Summary
Constructors Constructor Description ProcessorSupport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidfinalizeGroup(GroupConfig group)Finalizes a group configuration after its children have been processed.protected voidfinalizeRecord(RecordConfig record)Finalizes a record configuration after its children have been processed.protected voidfinalizeSegment(SegmentConfig segment)Finalizes a segment configuration after its children have been processed.protected voidfinalizeStream(StreamConfig stream)Finalizes a stream configuration after its children have been processed.protected ComponentConfiggetParent()Returns the parent component for the component being processed.protected voidhandleComponent(ComponentConfig component)Recursively preprocesses a component and its descendants.protected voidhandleConstant(ConstantConfig constant)Processes a constant configuration.protected voidhandleField(FieldConfig field)Processes a field configuration.protected voidinitializeGroup(GroupConfig group)Initializes a group configuration before its children have been processed.protected voidinitializeRecord(RecordConfig record)Initializes a record configuration before its children have been processed.protected voidinitializeSegment(SegmentConfig segment)Initializes a segment configuration before its children have been processed.protected voidinitializeStream(StreamConfig stream)Initializes a stream configuration before its children have been processed.protected voidprocess(StreamConfig stream)Processes a stream configuration.
-
-
-
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
-
-