public class OpenApiParserSession extends UonParserSession
OpenApiParser
.
This class is NOT thread safe. It is typically discarded after one-time use although it can be reused within the same thread.
Modifier | Constructor and Description |
---|---|
protected |
OpenApiParserSession(OpenApiParser 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.
|
<T> T |
parse(HttpPartType partType,
HttpPartSchema schema,
String in,
ClassMeta<T> type)
Converts the specified input to the specified class type.
|
OMap |
toMap()
Returns the properties defined on this bean context as a simple map for debugging purposes.
|
doParseIntoCollection, doParseIntoMap, getUonReader, isDecoding, isValidateEnd, parse, parse, parseAnything, parseAttr, parseAttrName, parseString
createPipe, getFileCharset, getStreamCharset, isReaderParser
cast, convertAttrToType, getClassMeta, getDebugOutputLines, getInputAsString, getJavaMethod, getLastLocation, getListener, getListener, getListenerClass, getOuter, getPosition, isAutoCloseStreams, isStrict, isTrimStrings, isUnbuffered, mark, onBeanSetterException, onUnknownProperty, parse, parse, parse, parse, parse, parse, parseArgs, parseIntoCollection, parseIntoMap, setCurrentClass, setCurrentProperty, setName, setParent, setPipe, trim, trim, unmark, unswap
_class, addWarning, checkForWarnings, convertToMemberType, convertToMemberType, convertToType, convertToType, convertToType, getArgsClassMeta, getBeanClassVisibility, getBeanConstructorVisibility, getBeanDictionaryClasses, getBeanFieldVisibility, getBeanFilters, getBeanMeta, getBeanMethodVisibility, getBeanRegistry, getBeanTypePropertyName, getBeanTypePropertyName, getClassMeta, getClassMeta, getClassMetaForObject, getClassMetaForObject, getExamples, getImplClasses, getNamePropertyName, getNotBeanClasses, getNotBeanPackagesNames, getNotBeanPackagesPrefixes, getPropertyNamer, getSchema, getStringBuilder, getSwaps, isBean, isBean, isBeanMapPutReturnsOldValue, isBeansRequireDefaultConstructor, isBeansRequireSerializable, isBeansRequireSettersForGetters, isBeansRequireSomeProperties, isFluentSetters, isIgnoreInvocationExceptionsOnGetters, isIgnoreInvocationExceptionsOnSetters, isIgnorePropertiesWithoutSetters, isIgnoreUnknownBeanProperties, isIgnoreUnknownNullBeanProperties, isSortProperties, isUseEnumNames, isUseInterfaceProxies, isUseJavaBeanIntrospector, newBean, newBean, newBeanMap, newBeanMap, object, returnStringBuilder, string, toArray, toBeanMap, toBeanMap
addToCache, addToCache, getClassProperty, getFromCache, getInstanceArrayProperty, getInstanceProperty, getLocale, getMediaType, getProperties, getProperty, getProperty, getProperty, getPropertyKeys, getTimeZone, getTimeZoneId, getWarnings, hasProperty, hasWarnings, isDebug, toString
protected OpenApiParserSession(OpenApiParser ctx, ParserSessionArgs args)
ctx
- The context creating this session object.
The context contains all the configuration settings for this object.args
- Runtime session arguments.public <T> T parse(HttpPartType partType, HttpPartSchema schema, String in, ClassMeta<T> type) throws ParseException, SchemaValidationException
HttpPartParserSession
parse
in interface HttpPartParserSession
parse
in class UonParserSession
partType
- The part type being parsed.schema
- Schema information about the part.
in
- The input being parsed.type
- The POJO type to transform the input into.ParseException
- Malformed input encountered.SchemaValidationException
- If the input or resulting HTTP part object fails schema validation.protected <T> T doParse(ParserPipe pipe, ClassMeta<T> type) throws IOException, ParseException, ExecutableException
ParserSession
Subclasses are expected to implement this method.
doParse
in class UonParserSession
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 IOException
- Thrown by underlying stream.ParseException
- Malformed input encountered.ExecutableException
- Exception occurred on invoked constructor/method/field.public OMap toMap()
Session
toMap
in class UonParserSession
Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.