Class ParserSession.Builder
- Direct Known Subclasses:
InputStreamParserSession.Builder,ReaderParserSession.Builder
- Enclosing class:
- ParserSession
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionApplies a consumer to this builder if it's the specified type.build()Build the object.Debug mode.javaMethod(Method value) The java method that called this serializer, usually the method in a REST servlet.The session locale.The session media type.mediaTypeDefault(MediaType value) Same asBeanSession.Builder.mediaType(MediaType)but doesn't overwrite the value if it is already set.The outer object for instantiating top-level non-static inner classes.properties(Map<String, Object> value) Session properties.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.The session timezone.timeZoneDefault(TimeZone value) Same asBeanSession.Builder.timeZone(TimeZone)but doesn't overwrite the value if it is already set.Create an unmodifiable session.
-
Constructor Details
-
Builder
Constructor- Parameters:
ctx- The context creating this session.
Cannot benull .
-
-
Method Details
-
apply
Description copied from class:ContextSession.BuilderApplies a consumer to this builder if it's the specified type.- Overrides:
applyin classBeanSession.Builder- Type Parameters:
T- The expected type.- Parameters:
type- The expected type.
Cannot benull .apply- The consumer to apply.
Cannot benull .- Returns:
- This object.
-
build
Description copied from class:BeanSession.BuilderBuild the object.- Overrides:
buildin classBeanSession.Builder- Returns:
- The built object.
-
debug
Description copied from class:ContextSession.BuilderDebug mode.Enables the following additional information during parsing:
- When bean setters throws exceptions, the exception includes the object stack information in order to determine how that method was invoked.
If not specified, defaults to
Context.Builder.debug().See Also:
- Overrides:
debugin classBeanSession.Builder- Parameters:
value- The new value for this property.
Ifnull , defaults toContext.isDebug().- Returns:
- This object.
-
javaMethod
The java method that called this serializer, usually the method in a REST servlet.- Parameters:
value- The new property value.
Can benull .- Returns:
- This object.
-
locale
Description copied from class:BeanSession.BuilderThe session locale.Specifies the default locale for serializer and parser sessions.
If not specified, defaults to
BeanContext.Builder.locale(Locale).See Also:
- Overrides:
localein classBeanSession.Builder- Parameters:
value- The new value for this property.
Ifnull defaults toBeanContext.getLocale()- Returns:
- This object.
-
mediaType
Description copied from class:BeanSession.BuilderThe session media type.Specifies the default media type value for serializer and parser sessions.
If not specified, defaults to
BeanContext.Builder.mediaType(MediaType).See Also:
- Overrides:
mediaTypein classBeanSession.Builder- Parameters:
value- The new value for this property.
Ifnull defaults toBeanContext.getMediaType().- Returns:
- This object.
-
mediaTypeDefault
Description copied from class:BeanSession.BuilderSame asBeanSession.Builder.mediaType(MediaType)but doesn't overwrite the value if it is already set.- Overrides:
mediaTypeDefaultin classBeanSession.Builder- Parameters:
value- The new value for this property.
Ifnull , then the locale defined on the context is used.- 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.
-
properties
Description copied from class:ContextSession.BuilderSession properties.Session properties are generic key-value pairs that can be passed through the session and made available to any customized serializers/parsers or swaps.
- Overrides:
propertiesin classBeanSession.Builder- Parameters:
value- The new value for this property.
Cannot benull .- Returns:
- This object.
-
property
Description copied from class:ContextSession.BuilderAdds a property to this session.- Overrides:
propertyin classBeanSession.Builder- Parameters:
key- The property key.
Cannot benull .value- The property value.
Can benull (removes the property).- Returns:
- This object.
-
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.
-
timeZone
Description copied from class:BeanSession.BuilderThe session timezone.Specifies the default timezone for serializer and parser sessions.
If not specified, defaults to
BeanContext.Builder.timeZone(TimeZone).See Also:
- Overrides:
timeZonein classBeanSession.Builder- Parameters:
value- The new value for this property.
Ifnull defaults toBeanContext.getTimeZone().- Returns:
- This object.
-
timeZoneDefault
Description copied from class:BeanSession.BuilderSame asBeanSession.Builder.timeZone(TimeZone)but doesn't overwrite the value if it is already set.- Overrides:
timeZoneDefaultin classBeanSession.Builder- Parameters:
value- The new value for this property.
Ifnull , then the locale defined on the context is used.- Returns:
- This object.
-
unmodifiable
Description copied from class:ContextSession.BuilderCreate an unmodifiable session.The created ContextSession object will be unmodifiable which makes it suitable for caching and reuse.
- Overrides:
unmodifiablein classBeanSession.Builder- Returns:
- This object.
-