Class ParserSession.Builder<SELF extends ParserSession.Builder<SELF>>
java.lang.Object
org.apache.juneau.marshall.ContextSession.Builder<SELF>
org.apache.juneau.marshall.MarshallingSession.Builder<SELF>
org.apache.juneau.marshall.parser.ParserSession.Builder<SELF>
- Direct Known Subclasses:
InputStreamParserSession.Builder,ParserSession.DefaultBuilder,ReaderParserSession.Builder
- Enclosing class:
- ParserSession
public abstract static class ParserSession.Builder<SELF extends ParserSession.Builder<SELF>>
extends MarshallingSession.Builder<SELF>
Builder class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the object.javaMethod(Method value) The java method that called this serializer, usually the method in a REST servlet.maxParseDepth(int value) The shared recursive-parse-depth budget honored by binary codec sessions (CBOR, Protobuf, MsgPack) at their recursive databind entry points.Per-session override for the parser's null-coercion policy.The outer object for instantiating top-level non-static inner classes.Adds a property to this session.schema(HttpPartSchema value) HTTP-part schema.schemaDefault(HttpPartSchema value) Same asschema(HttpPartSchema)but doesn't overwrite the value if it is already set.trimStrings(boolean value) Trim parsed strings.Methods inherited from class org.apache.juneau.marshall.MarshallingSession.Builder
activeView, locale, mediaType, mediaTypeDefault, timeZone, timeZoneDefaultMethods inherited from class org.apache.juneau.marshall.ContextSession.Builder
apply, cvt, debug, properties, self, unmodifiable
-
Constructor Details
-
Builder
Constructor- Parameters:
ctx- The context creating this session.
Cannot benull .
-
-
Method Details
-
build
Description copied from class:MarshallingSession.BuilderBuild the object.- Overrides:
buildin classMarshallingSession.Builder<SELF extends ParserSession.Builder<SELF>>- Returns:
- The built object.
-
javaMethod
The java method that called this serializer, usually the method in a REST servlet.- Parameters:
value- The new property value.
Can benull to leave (or clear) the associated java method unset.- Returns:
- This object.
-
outer
The outer object for instantiating top-level non-static inner classes.- Parameters:
value- The new property value.
Can benull (no outer object will be used, suitable for static or top-level classes).- Returns:
- This object.
-
maxParseDepth
The shared recursive-parse-depth budget honored by binary codec sessions (CBOR, Protobuf, MsgPack) at their recursive databind entry points.- Parameters:
value- The new property value.
Defaults to 1000.- Returns:
- This object.
- See Also:
-
property
Description copied from class:ContextSession.BuilderAdds a property to this session.If the key matches a known session property (e.g.
"debug" or"ContextSession.debug" ), the value is converted viaBasicConverterand routed to the corresponding typed setter. Unknown keys are stored in the raw session properties map.- Overrides:
propertyin classMarshallingSession.Builder<SELF extends ParserSession.Builder<SELF>>- Parameters:
key- The property key.
Cannot benull .value- The property value.
Can benull (resets typed properties to their default; removes raw properties).- Returns:
- This object.
-
trimStrings
Trim parsed strings.- Parameters:
value- The new value for this setting.- Returns:
- This object.
-
nulls
Per-session override for the parser's null-coercion policy.- Parameters:
value- The new value for this setting.nullis treated asNulls.NOT_SET.- Returns:
- This object.
- Since:
- 10.0.0
- See Also:
-
schema
HTTP-part schema.Used for schema-based serializers and parsers to define additional formatting.
- Parameters:
value- The new value for this property.
Can benull (will not set the value, keeps existing schema or remainsnull ).- Returns:
- This object.
-
schemaDefault
Same asschema(HttpPartSchema)but doesn't overwrite the value if it is already set.- Parameters:
value- The new value for this property.
Ifnull , the value will not be set (keeps existing schema or remainsnull ).- Returns:
- This object.
-