public class PlainTextParserSession extends ReaderParserSession
PlainTextParser
.
This class is NOT thread safe. It is typically discarded after one-time use although it can be reused against multiple inputs.
Modifier | Constructor and Description |
---|---|
protected |
PlainTextParserSession(PlainTextParser ctx,
ParserSessionArgs args)
Create a new session using properties specified in the context.
|
Modifier and Type | Method and Description |
---|---|
protected <T> T |
doParse(ParserPipe pipe,
ClassMeta<T> type)
Workhorse method.
|
isReaderParser
asMap, cast, convertAttrToType, createPipe, doParseIntoCollection, doParseIntoMap, getClassMeta, getJavaMethod, getLastLocation, getListener, getListener, getOuter, isStrict, isTrimStrings, onUnknownProperty, parse, parse, parse, parseArgs, parseIntoCollection, parseIntoMap, setCurrentClass, setCurrentProperty, setName, setParent, trim, trim
_class, checkForWarnings, convertToMemberType, convertToMemberType, convertToType, convertToType, convertToType, getArgsClassMeta, getBeanMeta, getBeanRegistry, getBeanTypePropertyName, getClassMeta, getClassMeta, getClassMetaForObject, getLocale, getMediaType, getStringBuilder, getTimeZone, isBean, isBean, isDebug, isIgnoreUnknownBeanProperties, newBean, newBean, newBeanMap, newBeanMap, newInstance, newInstance, newInstanceFromOuter, object, returnStringBuilder, string, toArray, toBeanMap, toBeanMap
addToCache, addToCache, addWarning, getClassProperty, getFromCache, getInstanceArrayProperty, getInstanceProperty, getLogger, getProperties, getProperty, getProperty, getProperty, getPropertyKeys, getWarnings, hasWarnings, toString
protected PlainTextParserSession(PlainTextParser ctx, ParserSessionArgs args)
ctx
- The parser creating this session object.
The parser contains all the configuration settings for this object.args
- Runtime session arguments.protected <T> T doParse(ParserPipe pipe, ClassMeta<T> type) throws Exception
ParserSession
doParse
in class ParserSession
T
- The class type of the object to create.pipe
- Where to get the input from.type
- The class type of the object to create.
If Object.class
, object type is based on what's being parsed.
For example, when parsing JSON text, it may return a String
, Number
,
ObjectMap
, etc...Exception
- If thrown from underlying stream, or if the input contains a syntax error or is malformed.Copyright © 2018 Apache. All rights reserved.