public interface ParserFactory
StreamConfig
)
into a stream parser (i.e. Stream
).
A new parser factory is used to parse each stream configuration, thus implementations need not worry about thread safety.
All properties (e.g. classLoader) are set before createStream(StreamConfig)
is invoked.
Modifier and Type | Method and Description |
---|---|
Stream |
createStream(StreamConfig config)
Creates a new stream parser from a given stream configuration.
|
void |
setClassLoader(ClassLoader classLoader)
Sets the
ClassLoader to use for resolving configured class names. |
void |
setTypeHandlerFactory(TypeHandlerFactory typeHandlerFactory)
Sets the type handler factory to use for resolving type handlers.
|
void setClassLoader(ClassLoader classLoader)
ClassLoader
to use for resolving configured class names.classLoader
- the ClassLoader
void setTypeHandlerFactory(TypeHandlerFactory typeHandlerFactory)
typeHandlerFactory
- the TypeHandlerFactory
Stream createStream(StreamConfig config) throws BeanIOConfigurationException
config
- the stream configurationStream
BeanIOConfigurationException
- if the configuration is invalid