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
AParserFactory
for 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:ParserFactorySupport
Creates a stream configuration pre-processor. May be overridden to return a format specific version.- Overrides:
createPreprocessor
in 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:ParserFactorySupport
Creates a new stream definition based on a stream configuration.- Specified by:
createStream
in interfaceParserFactory
- Overrides:
createStream
in 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:ParserFactorySupport
Called byParserFactorySupport.initializeSegment(SegmentConfig)
to initialize segment iteration.- Overrides:
initializeSegmentIteration
in classParserFactorySupport
- Parameters:
config
- the segment configurationproperty
- theProperty
bound to the segment, or null if no bean was bound
-
finalizeSegmentIteration
protected void finalizeSegmentIteration(SegmentConfig config, Property property)
Description copied from class:ParserFactorySupport
Called byParserFactorySupport.finalizeSegment(SegmentConfig)
to finalize segment iteration.- Overrides:
finalizeSegmentIteration
in classParserFactorySupport
- Parameters:
config
- the segment configuration
-
initializeSegmentMain
protected void initializeSegmentMain(SegmentConfig config, Property property)
Description copied from class:ParserFactorySupport
Called byParserFactorySupport.initializeSegment(SegmentConfig)
to initialize the segment.- Overrides:
initializeSegmentMain
in 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:ParserFactorySupport
Called byParserFactorySupport.finalizeSegment(SegmentConfig)
to finalize the segment component.- Overrides:
finalizeSegmentMain
in classParserFactorySupport
- Parameters:
config
- the segment configuration- Throws:
BeanIOConfigurationException
-
isSegmentRequired
protected boolean isSegmentRequired(SegmentConfig config)
- Overrides:
isSegmentRequired
in classParserFactorySupport
-
createStreamFormat
protected StreamFormat createStreamFormat(StreamConfig config)
Description copied from class:ParserFactorySupport
Creates a format specificStreamFormat
.- Specified by:
createStreamFormat
in classParserFactorySupport
- Parameters:
config
- the stream configuration- Returns:
- the new
StreamFormat
-
createRecordFormat
protected RecordFormat createRecordFormat(RecordConfig config)
Description copied from class:ParserFactorySupport
Creates a format specificRecordFormat
.- Specified by:
createRecordFormat
in classParserFactorySupport
- Parameters:
config
- the record configuration- Returns:
- the new
RecordFormat
-
createFieldFormat
protected FieldFormat createFieldFormat(FieldConfig config, java.lang.Class<?> type)
Description copied from class:ParserFactorySupport
Creates a format specificFieldFormat
.- Specified by:
createFieldFormat
in 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:ParserFactorySupport
Returns the defaultRecordParserFactory
.- Specified by:
getDefaultRecordParserFactory
in classParserFactorySupport
- Returns:
- the
RecordParserFactory
-
-