Class UrlEncodingParser.Builder
- Enclosing class:
- UrlEncodingParser
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBuilder()Constructor, default settings.protectedBuilder(UrlEncodingParser copyFrom) Copy constructor.protectedBuilder(UrlEncodingParser.Builder copyFrom) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the object.copy()Copy creator.Serialize bean property collections/arrays as separate key/value pairs.expandedParams(boolean value) Same asexpandedParams()but allows you to explicitly specify the value.hashKey()Returns the hashkey of this builder.Methods inherited from class org.apache.juneau.marshall.uon.UonParser.Builder
decoding, decoding, validateEnd, validateEndMethods inherited from class org.apache.juneau.marshall.parser.ReaderParser.Builder
streamCharsetMethods inherited from class org.apache.juneau.marshall.parser.Parser.Builder
autoCloseStreams, autoCloseStreams, consumes, debugOutputLines, getConsumes, getNulls, listener, nulls, trimStrings, trimStrings, unbuffered, unbufferedMethods inherited from class org.apache.juneau.marshall.MarshallingContextable.Builder
activeView, annotations, beanClassVisibility, beanConstructorVisibility, beanDictionary, beanFieldVisibility, beanInterceptor, beanMapPutReturnsOldValue, beanMethodVisibility, beanProperties, beanProperties, beanProperties, beanPropertiesExcludes, beanPropertiesExcludes, beanPropertiesExcludes, beanPropertiesReadOnly, beanPropertiesReadOnly, beanPropertiesReadOnly, beanPropertiesWriteOnly, beanPropertiesWriteOnly, beanPropertiesWriteOnly, beansRequireDefaultConstructor, beansRequireSerializable, beansRequireSettersForGetters, bigNumberFormat, binaryFormat, bitSetFormat, booleanFormat, calendarFormat, classFormat, classLoader, currencyFormat, dateFormat, debug, dictionaryOn, disableBeansRequireSomeProperties, disableDefaultViewInclusion, disableIgnoreMissingSetters, disableIgnoreTransientFields, disableIgnoreUnknownNullBeanProperties, disableInterfaceProxies, durationFormat, enumFormat, example, example, findFluentSetters, findFluentSetters, floatFormat, ignoreInvocationExceptionsOnGetters, ignoreInvocationExceptionsOnSetters, ignoreUnknownBeanProperties, ignoreUnknownEnumValues, implClass, implClasses, interfaceClass, interfaces, locale, localeFormat, marshallingContext, marshallingContext, marshallingContext, marshallingContext, mediaType, notBeanClasses, notBeanPackages, periodFormat, propertyNamer, propertyNamer, recordComponentOrder, stopClass, swap, swap, swaps, swaps, temporalFormat, timeZone, timeZoneFormat, typeName, typePropertyName, typePropertyName, unsortedProperties, unsortedProperties, useJavaBeanIntrospector, uuidFormat, validateSchema, validateSchemaMethods inherited from class org.apache.juneau.marshall.Context.Builder
annotations, apply, applyAnnotations, applyAnnotations, asSubtype, build, cache, canApply, copyOrNull, debug, getApplied, getType, impl, isDebug, registerBuilders, self, type
-
Constructor Details
-
Builder
protected Builder()Constructor, default settings. -
Builder
Copy constructor.- Parameters:
copyFrom- The builder to copy from.
Cannot benull .
-
Builder
Copy constructor.- Parameters:
copyFrom- The bean to copy from.
Cannot benull .
-
-
Method Details
-
build
Description copied from class:Context.BuilderBuild the object.- Overrides:
buildin classUonParser.Builder<UrlEncodingParser.Builder>- Returns:
- The built object.
-
copy
Description copied from class:Context.BuilderCopy creator.- Specified by:
copyin classUonParser.Builder<UrlEncodingParser.Builder>- Returns:
- A new mutable copy of this builder.
-
expandedParams
Serialize bean property collections/arrays as separate key/value pairs.This is the parser-side equivalent of the
UrlEncodingSerializer.Builder.expandedParams()setting.If
false , serializing the array[1,2,3] results in?key=$a(1,2,3) .
Iftrue , serializing the same array results in?key=1&key=2&key=3 .Example:
public class MyBean {public String[]f1 ;public List<String>f2 ; } UrlEncodingParserparser1 = UrlEncodingParser.DEFAULT ; UrlEncodingParserparser2 = UrlEncodingParser.create ().expandedParams().build(); MyBeanmyBean1 =parser1 .read("f1=@(a,b)&f2=@(c,d)" , A.class ); MyBeanmyBean2 =parser2 .read("f1=a&f1=b&f2=c&f2=d" , A.class );This option only applies to beans.
Notes:
- If parsing multi-part parameters, it's highly recommended to use Collections or Lists as bean property types instead of arrays since arrays have to be recreated from scratch every time a value is added to it.
- Returns:
- This object.
-
expandedParams
Same asexpandedParams()but allows you to explicitly specify the value.- Parameters:
value- The value for this setting.- Returns:
- This object.
-
hashKey
Description copied from class:Context.BuilderReturns the hashkey of this builder.Used to return previously instantiated context beans that have matching hashkeys. The
HashKeyobject is suitable for use as a hashmap key of a map of context beans. A context bean is considered equivalent if theHashKey.equals(Object)method is the same.- Overrides:
hashKeyin classUonParser.Builder<UrlEncodingParser.Builder>- Returns:
- The hashkey of this builder.
-