public class UrlEncodingParserSession extends UonParserSession
UrlEncodingParser.
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 |
UrlEncodingParserSession(UrlEncodingParser ctx,
ParserSessionArgs args)
Create a new session using properties specified in the context.
|
| Modifier and Type | Method and Description |
|---|---|
ObjectMap |
asMap()
Returns the properties defined on this bean context as a simple map for debugging purposes.
|
protected <T> T |
doParse(ParserPipe pipe,
ClassMeta<T> type)
Workhorse method.
|
protected <K,V> Map<K,V> |
doParseIntoMap(ParserPipe pipe,
Map<K,V> m,
Type keyType,
Type valueType)
Implementation method.
|
protected boolean |
isExpandedParams()
Configuration property: Parser bean property collections/arrays as separate key/value pairs.
|
boolean |
shouldUseExpandedParams(BeanPropertyMeta pMeta)
Returns
|
doParseIntoCollection, getUonReader, isDecodeChars, isValidateEnd, parse, parse, parse, parse, parse, parse, parseAnything, parseAttr, parseAttrName, parseStringcreatePipe, getFileCharset, getInputStreamCharset, isReaderParsercast, convertAttrToType, getClassMeta, getDebugOutputLines, getInputAsString, getJavaMethod, getLastLocation, getListener, getListener, getListenerClass, getOuter, getPosition, isAutoCloseStreams, isStrict, isTrimStrings, isUnbuffered, mark, onUnknownProperty, parse, parse, parse, parseArgs, parseIntoCollection, parseIntoMap, setCurrentClass, setCurrentProperty, setName, setParent, setPipe, trim, trim, unmark_class, checkForWarnings, convertToMemberType, convertToMemberType, convertToType, convertToType, convertToType, getArgsClassMeta, getBeanClassVisibility, getBeanConstructorVisibility, getBeanDictionaryClasses, getBeanFieldVisibility, getBeanMeta, getBeanMethodVisibility, getBeanRegistry, getBeanTypePropertyName, getBeanTypePropertyName, getClassMeta, getClassMeta, getClassMetaForObject, getLocale, getMediaType, getPropertyNamer, getSchema, getStringBuilder, getTimeZone, isBean, isBean, isBeanMapPutReturnsOldValue, isBeansRequireDefaultConstructor, isBeansRequireSerializable, isBeansRequireSettersForGetters, isBeansRequireSomeProperties, isDebug, isFluentSetters, isIgnoreInvocationExceptionsOnGetters, isIgnoreInvocationExceptionsOnSetters, isIgnorePropertiesWithoutSetters, isIgnoreUnknownBeanProperties, isIgnoreUnknownNullBeanProperties, isSortProperties, isUseEnumNames, isUseInterfaceProxies, isUseJavaBeanIntrospector, newBean, newBean, newBeanMap, newBeanMap, newInstance, newInstance, newInstanceFromOuter, object, returnStringBuilder, string, toArray, toBeanMap, toBeanMapaddToCache, addToCache, addWarning, getClassProperty, getFromCache, getInstanceArrayProperty, getInstanceProperty, getLogger, getProperties, getProperty, getProperty, getProperty, getPropertyKeys, getWarnings, hasProperty, hasWarnings, toStringprotected UrlEncodingParserSession(UrlEncodingParser 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 ObjectMap asMap()
SessionasMap in class UonParserSessionpublic final boolean shouldUseExpandedParams(BeanPropertyMeta pMeta)
pMeta - The metadata on the bean property.protected <T> T doParse(ParserPipe pipe, ClassMeta<T> type) throws Exception
ParserSessionSubclasses are expected to implement this method.
doParse in class UonParserSessionT - 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.protected <K,V> Map<K,V> doParseIntoMap(ParserPipe pipe, Map<K,V> m, Type keyType, Type valueType) throws Exception
ParserSession
Default implementation throws an UnsupportedOperationException.
doParseIntoMap in class UonParserSessionpipe - The parser input.m - The map being loaded.keyType - The class type of the keys, or String.class .valueType - The class type of the values, or Exception - If thrown from underlying stream, or if the input contains a syntax error or is malformed.protected final boolean isExpandedParams()
[1,2,3] results in ?key=$a(1,2,3).
?key=1&key=2&key=3.UrlEncodingParser.URLENC_expandedParamsCopyright © 2018 Apache. All rights reserved.