Package org.apache.juneau.oapi
Class OpenApiParserSession
java.lang.Object
org.apache.juneau.ContextSession
org.apache.juneau.BeanSession
org.apache.juneau.parser.ParserSession
org.apache.juneau.parser.ReaderParserSession
org.apache.juneau.uon.UonParserSession
org.apache.juneau.oapi.OpenApiParserSession
- All Implemented Interfaces:
- HttpPartParserSession
Session object that lives for the duration of a single use of 
OpenApiParser.
 Notes:
- This class is not thread safe and is typically discarded after one use.
See Also:
- 
Nested Class SummaryNested Classes
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedConstructor.
- 
Method SummaryModifier and TypeMethodDescriptionstatic OpenApiParserSession.Buildercreate(OpenApiParser ctx) Creates a new builder for this object.protected <T> TdoParse(ParserPipe pipe, ClassMeta<T> type) Workhorse method.<T> Tparse(HttpPartType partType, HttpPartSchema schema, String in, ClassMeta<T> type) Converts the specified input to the specified class type.Methods inherited from class org.apache.juneau.uon.UonParserSessioncreate, doParseIntoCollection, doParseIntoMap, getUonReader, isDecoding, isValidateEnd, parseAnything, parseAttr, parseAttrName, parseString, propertiesMethods inherited from class org.apache.juneau.parser.ReaderParserSessioncreate, createPipe, getFileCharset, getStreamCharset, isReaderParserMethods inherited from class org.apache.juneau.parser.ParserSessioncast, convertAttrToType, create, getClassMeta, getDebugOutputLines, getInputAsString, getJavaMethod, getLastLocation, getListener, getListener, getListenerClass, getOuter, getPosition, getSchema, getStringBuilder, isAutoCloseStreams, isStrict, isTrimStrings, isUnbuffered, mark, onBeanSetterException, onUnknownProperty, parse, parse, parse, parse, parse, parse, parseArgs, parseIntoCollection, parseIntoMap, returnStringBuilder, setCurrentClass, setCurrentProperty, setName, setParent, setPipe, trim, trim, unmark, unswapMethods inherited from class org.apache.juneau.BeanSession_class, addWarning, convertToMemberType, convertToMemberType, convertToType, convertToType, convertToType, create, getArgsClassMeta, getBeanClassVisibility, getBeanConstructorVisibility, getBeanDictionary, getBeanFieldVisibility, getBeanMeta, getBeanMethodVisibility, getBeanRegistry, getBeanTypePropertyName, getBeanTypePropertyName, getClassMeta, getClassMeta, getClassMetaForObject, getClassMetaForObject, getLocale, getMediaType, getNamePropertyName, getNotBeanClasses, getNotBeanPackagesNames, getNotBeanPackagesPrefixes, getPropertyNamer, getSwaps, getTimeZone, getTimeZoneId, isBean, isBean, isBeanMapPutReturnsOldValue, isBeansRequireDefaultConstructor, isBeansRequireSerializable, isBeansRequireSettersForGetters, isBeansRequireSomeProperties, isFindFluentSetters, isIgnoreInvocationExceptionsOnGetters, isIgnoreInvocationExceptionsOnSetters, isIgnoreMissingSetters, isIgnoreUnknownBeanProperties, isIgnoreUnknownNullBeanProperties, isSortProperties, isUseEnumNames, isUseInterfaceProxies, isUseJavaBeanIntrospector, newBean, newBean, newBeanMap, newBeanMap, newGenericMap, object, string, toArray, toBeanMap, toBeanMap, toBeanMapMethods inherited from class org.apache.juneau.ContextSessioncheckForWarnings, getContext, getSessionProperties, getWarnings, isDebug, toString
- 
Constructor Details- 
OpenApiParserSessionConstructor.- Parameters:
- builder- The builder for this object.
 
 
- 
- 
Method Details- 
createCreates a new builder for this object.- Parameters:
- ctx- The context creating this session.
- Returns:
- A new builder.
 
- 
parsepublic <T> T parse(HttpPartType partType, HttpPartSchema schema, String in, ClassMeta<T> type) throws ParseException, SchemaValidationException Description copied from interface:HttpPartParserSessionConverts the specified input to the specified class type.- Specified by:
- parsein interface- HttpPartParserSession
- Overrides:
- parsein class- UonParserSession
- Type Parameters:
- T- The POJO type to transform the input into.
- Parameters:
- partType- The part type being parsed.
- schema- Schema information about the part.
 May be- null .
 Not all part parsers use the schema information.
- in- The input being parsed.
- type- The POJO type to transform the input into.
- Returns:
- The parsed value.
- Throws:
- ParseException- Malformed input encountered.
- SchemaValidationException- If the input or resulting HTTP part object fails schema validation.
 
- 
doParseprotected <T> T doParse(ParserPipe pipe, ClassMeta<T> type) throws IOException, ParseException, ExecutableException Description copied from class:ParserSessionWorkhorse method.Subclasses are expected to implement this method or Parser.doParse(ParserSession,ParserPipe,ClassMeta).The default implementation of this method simply calls Parser.doParse(ParserSession,ParserPipe,ClassMeta).- Overrides:
- doParsein class- UonParserSession
- Type Parameters:
- T- The class type of the object to create.
- Parameters:
- pipe- Where to get the input from.
- type- The class type of the object to create. If- null or- Object., object type is based on what's being parsed. For example, when parsing JSON text, it may return a- class - String ,- Number ,- JsonMap , etc...
- Returns:
- The parsed object.
- Throws:
- IOException- Thrown by underlying stream.
- ParseException- Malformed input encountered.
- ExecutableException- Exception occurred on invoked constructor/method/field.
 
 
-