Class JsonParserFactory
- java.lang.Object
-
- org.beanio.internal.compiler.ProcessorSupport
-
- org.beanio.internal.compiler.ParserFactorySupport
-
- org.beanio.internal.compiler.json.JsonParserFactory
-
- All Implemented Interfaces:
ParserFactory
public class JsonParserFactory extends ParserFactorySupport
AParserFactoryfor the JSON stream format.- Since:
- 2.0
-
-
Constructor Summary
Constructors Constructor Description JsonParserFactory()
-
Method Summary
-
Methods inherited from class org.beanio.internal.compiler.ParserFactorySupport
createAggregation, createProperty, createRecordAggregation, createRecordParserFactory, finalizeGroup, finalizeGroup, finalizeGroupIteration, finalizeGroupMain, finalizeRecord, finalizeRecord, finalizeRecordIteration, finalizeRecordMain, finalizeSegment, finalizeSegment, finalizeStream, getBeanClass, getField, handleConstant, handleField, initializeGroup, initializeGroupIteration, initializeGroupMain, initializeRecord, initializeRecordIteration, initializeRecordMain, initializeSegment, initializeStream, isBound, isReadEnabled, isWriteEnabled, parseDefaultValue, popParser, popProperty, pushParser, pushProperty, reflectAggregationType, reflectCollectionType, reflectPropertyType, reflectRecordAggregationType, setClassLoader, setTypeHandlerFactory, updateConstructor
-
Methods inherited from class org.beanio.internal.compiler.ProcessorSupport
getParent, handleComponent, process
-
-
-
-
Method Detail
-
createPreprocessor
protected Preprocessor createPreprocessor(StreamConfig config)
Description copied from class:ParserFactorySupportCreates a stream configuration pre-processor. May be overridden to return a format specific version.- Overrides:
createPreprocessorin classParserFactorySupport- Parameters:
config- the stream configuration to pre-process- Returns:
- the new
Preprocessor
-
createStream
public Stream createStream(StreamConfig config) throws BeanIOConfigurationException
Description copied from class:ParserFactorySupportCreates a new stream definition based on a stream configuration.- Specified by:
createStreamin interfaceParserFactory- Overrides:
createStreamin classParserFactorySupport- Parameters:
config- the stream configuration- Returns:
- the new
Stream - Throws:
BeanIOConfigurationException- if the configuration is invalid
-
initializeSegmentIteration
protected void initializeSegmentIteration(SegmentConfig config, Property property)
Description copied from class:ParserFactorySupportCalled byParserFactorySupport.initializeSegment(SegmentConfig)to initialize segment iteration.- Overrides:
initializeSegmentIterationin classParserFactorySupport- Parameters:
config- the segment configurationproperty- thePropertybound to the segment, or null if no bean was bound
-
finalizeSegmentIteration
protected void finalizeSegmentIteration(SegmentConfig config, Property property)
Description copied from class:ParserFactorySupportCalled byParserFactorySupport.finalizeSegment(SegmentConfig)to finalize segment iteration.- Overrides:
finalizeSegmentIterationin classParserFactorySupport- Parameters:
config- the segment configuration
-
initializeSegmentMain
protected void initializeSegmentMain(SegmentConfig config, Property property)
Description copied from class:ParserFactorySupportCalled byParserFactorySupport.initializeSegment(SegmentConfig)to initialize the segment.- Overrides:
initializeSegmentMainin classParserFactorySupport- Parameters:
config- the segment configurationproperty- the property bound to the segment, or null if no property was bound
-
finalizeSegmentMain
protected Property finalizeSegmentMain(SegmentConfig config) throws BeanIOConfigurationException
Description copied from class:ParserFactorySupportCalled byParserFactorySupport.finalizeSegment(SegmentConfig)to finalize the segment component.- Overrides:
finalizeSegmentMainin classParserFactorySupport- Parameters:
config- the segment configuration- Throws:
BeanIOConfigurationException
-
isSegmentRequired
protected boolean isSegmentRequired(SegmentConfig config)
- Overrides:
isSegmentRequiredin classParserFactorySupport
-
createStreamFormat
protected StreamFormat createStreamFormat(StreamConfig config)
Description copied from class:ParserFactorySupportCreates a format specificStreamFormat.- Specified by:
createStreamFormatin classParserFactorySupport- Parameters:
config- the stream configuration- Returns:
- the new
StreamFormat
-
createRecordFormat
protected RecordFormat createRecordFormat(RecordConfig config)
Description copied from class:ParserFactorySupportCreates a format specificRecordFormat.- Specified by:
createRecordFormatin classParserFactorySupport- Parameters:
config- the record configuration- Returns:
- the new
RecordFormat
-
createFieldFormat
protected FieldFormat createFieldFormat(FieldConfig config, java.lang.Class<?> type)
Description copied from class:ParserFactorySupportCreates a format specificFieldFormat.- Specified by:
createFieldFormatin classParserFactorySupport- Parameters:
config- the field configurationtype- the property type, or null if not bound to a property- Returns:
- the new
FieldFormat
-
getDefaultRecordParserFactory
protected RecordParserFactory getDefaultRecordParserFactory()
Description copied from class:ParserFactorySupportReturns the defaultRecordParserFactory.- Specified by:
getDefaultRecordParserFactoryin classParserFactorySupport- Returns:
- the
RecordParserFactory
-
-