Package org.apache.juneau.marshall.hocon
Class HoconParserSession
java.lang.Object
org.apache.juneau.marshall.ContextSession
org.apache.juneau.marshall.MarshallingSession
org.apache.juneau.marshall.parser.ParserSession
org.apache.juneau.marshall.parser.ReaderParserSession
org.apache.juneau.marshall.hocon.HoconParserSession
- All Implemented Interfaces:
BeanSession,ConverterSession,RecordReadable
Session for parsing HOCON format into POJOs.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for HOCON parser session.Nested classes/interfaces inherited from class org.apache.juneau.marshall.parser.ReaderParserSession
ReaderParserSession.DefaultBuilder -
Field Summary
Fields inherited from class org.apache.juneau.marshall.parser.ParserSession
DEFAULT_MAX_PARSE_DEPTHFields inherited from class org.apache.juneau.marshall.MarshallingSession
NAME_PROPERTY_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HoconParserSession.Buildercreate(HoconParser ctx) Creates a session builder.protected <T> TdoRead(ParserPipe pipe, ClassMeta<T> type) Workhorse method.booleanStreaming-quality signal queryable before opening a cursor.readRecords(Object input) Opens a low-levelRecordReadercursor over the specified input.Methods inherited from class org.apache.juneau.marshall.parser.ReaderParserSession
create, createPipe, getStreamCharset, isReaderParser, propertiesMethods inherited from class org.apache.juneau.marshall.parser.ParserSession
allocateLocal, cast, checkRequired, convertAttrToType, create, doReadIntoCollection, doReadIntoMap, doReadToBeanConsumer, enterParseDepth, exitParseDepth, getCalendarFormat, getClassMeta, getDateFormat, getDebugOutputLines, getDurationFormat, getInputAsString, getJavaMethod, getLastLocation, getListener, getListener, getListenerClass, getLocaleFormat, getNulls, getOuter, getPeriodFormat, getPosition, getSchema, getStringBuilder, getTemporalFormat, getTimeZoneFormat, isAutoCloseStreams, isTrimStrings, isUnbuffered, mark, onBeanSetterException, onUnknownProperty, parentBean, read, read, read, read, read, read, readArgs, readCalendar, readDate, readDuration, readIntoCollection, readIntoMap, readPeriod, readTemporal, readToBeanConsumer, returnStringBuilder, setCurrentClass, setCurrentProperty, setName, setParent, setPipe, swapParentBean, trim, trim, unmark, unswapMethods inherited from class org.apache.juneau.marshall.MarshallingSession
addWarning, convertToMemberType, convertToMemberType, convertToMemberType, convertToType, convertToType, convertToType, convertToType, create, get, getActiveView, getAnnotationProvider, getArgsClassMeta, getBeanClassVisibility, getBeanConstructorVisibility, getBeanDictionary, getBeanFieldVisibility, getBeanMeta, getBeanMethodVisibility, getBeanRegistry, getBeanTypePropertyName, getBeanTypePropertyName, getClassLoader, getClassMeta, getClassMeta, getClassMetaForObject, getClassMetaForObject, getLocale, getMarshallingContext, getMediaType, getNotBeanClasses, getNotBeanPackagesNames, getPropertyNamer, getSwaps, getTimeZone, getTimeZoneId, isBean, isBean, isBeanMapPutReturnsOldValue, isBeansRequireDefaultConstructor, isBeansRequireSerializable, isBeansRequireSettersForGetters, isBeansRequireSomeProperties, isFindFluentSetters, isIgnoreInvocationExceptionsOnGetters, isIgnoreInvocationExceptionsOnSetters, isIgnoreMissingSetters, isIgnoreUnknownBeanProperties, isIgnoreUnknownNullBeanProperties, isPropertyInActiveView, isRecordComponentOrder, isUnsortedProperties, isUseInterfaceProxies, isUseJavaBeanIntrospector, isValidateSchema, newBean, newBean, newBeanMap, newBeanMap, newGenericList, newGenericMap, newGenericMap, object, parseToList, parseToMap, string, toArray, toBeanMap, toBeanMap, toBeanMapMethods inherited from class org.apache.juneau.marshall.ContextSession
checkForWarnings, getContext, getSessionProperties, getWarnings, isDebug, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.juneau.commons.conversion.ConverterSession
get
-
Constructor Details
-
HoconParserSession
-
-
Method Details
-
create
Creates a session builder.- Parameters:
ctx- The parser context.
Cannot benull .- Returns:
- The builder.
-
readRecords
Description copied from interface:RecordReadableOpens a low-levelRecordReadercursor over the specified input.When invoked on a convenience
Parserthe cursor is opened with default session args (mirroringread(...)). Callers that need request-derived configuration (locale, timezone, schema, swaps) should instead callcreateSession(args).build()and invoke this method on the resultingParserSession(which is also aRecordReadable).- Specified by:
readRecordsin interfaceRecordReadable- Parameters:
input- The input. Subtypes define the supported types (typicallyReader/CharSequence/InputStream/byte[]/File).- Returns:
- A new
RecordReadercursor. - Throws:
IOException- If a problem occurred reading the underlying input.
-
isRecordStreaming
Description copied from interface:RecordReadableStreaming-quality signal queryable before opening a cursor.- Specified by:
isRecordStreamingin interfaceRecordReadable- Returns:
true ifRecordReadable.readRecords(Object)returns an O(1)-memory streaming cursor;false for buffered (whole-value) formats backed byRecordAdapter.
-
doRead
protected <T> T doRead(ParserPipe pipe, ClassMeta<T> type) throws IOException, ParseException, ExecutableException Description copied from class:ParserSessionWorkhorse method.Subclasses are expected to implement this method or
Parser.doRead(ParserSession,ParserPipe,ClassMeta).The default implementation of this method simply calls
Parser.doRead(ParserSession,ParserPipe,ClassMeta).- Overrides:
doReadin classParserSession- 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. Ifnull orObject., object type is based on what's being parsed. For example, when parsing JSON text, it may return aclass 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.
-