Class OpenApiParserSession.Builder
- Enclosing class:
OpenApiParserSession
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionApplies a consumer to this builder if it's the specified type.build()
Build the object.Debug mode.decoding
(boolean value) Overrides the decoding flag on the context for this session.fileCharset
(Charset value) File charset.javaMethod
(Method value) The java method that called this serializer, usually the method in a REST servlet.The session locale.localeDefault
(Locale value) Same asBeanSession.Builder.locale(Locale)
but doesn't overwrite the value if it is already set.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 asParserSession.Builder.schema(HttpPartSchema)
but doesn't overwrite the value if it is already set.streamCharset
(Charset value) Input stream charset.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.
-
-
Method Details
-
build
Description copied from class:BeanSession.Builder
Build the object.- Overrides:
build
in classUonParserSession.Builder
- Returns:
- The built object.
-
apply
Description copied from class:ContextSession.Builder
Applies a consumer to this builder if it's the specified type.- Overrides:
apply
in classUonParserSession.Builder
- Type Parameters:
T
- The expected type.- Parameters:
type
- The expected type.apply
- The consumer to apply.- Returns:
- This object.
-
debug
Description copied from class:ContextSession.Builder
Debug 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:
debug
in classUonParserSession.Builder
- Parameters:
value
- The new value for this property.
Can benull . Value will be ignored.- Returns:
- This object.
-
properties
Description copied from class:ContextSession.Builder
Session 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:
properties
in classUonParserSession.Builder
- Parameters:
value
- The new value for this property.
Can benull .- Returns:
- This object.
-
property
Description copied from class:ContextSession.Builder
Adds a property to this session.- Overrides:
property
in classUonParserSession.Builder
- Parameters:
key
- The property key.value
- The property value.- Returns:
- This object.
-
unmodifiable
Description copied from class:ContextSession.Builder
Create an unmodifiable session.The created ContextSession object will be unmodifiable which makes it suitable for caching and reuse.
- Overrides:
unmodifiable
in classUonParserSession.Builder
- Returns:
- This object.
-
locale
Description copied from class:BeanSession.Builder
The session locale.Specifies the default locale for serializer and parser sessions.
If not specified, defaults to
BeanContext.Builder.locale(Locale)
.See Also:
- Overrides:
locale
in classUonParserSession.Builder
- Parameters:
value
- The new value for this property.
Ifnull , then the locale defined on the context is used.- Returns:
- This object.
-
localeDefault
Description copied from class:BeanSession.Builder
Same asBeanSession.Builder.locale(Locale)
but doesn't overwrite the value if it is already set.- Overrides:
localeDefault
in classUonParserSession.Builder
- Parameters:
value
- The new value for this property.
Ifnull , then the locale defined on the context is used.- Returns:
- This object.
-
mediaType
Description copied from class:BeanSession.Builder
The 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:
mediaType
in classUonParserSession.Builder
- Parameters:
value
- The new value for this property.
Can benull .- Returns:
- This object.
-
mediaTypeDefault
Description copied from class:BeanSession.Builder
Same asBeanSession.Builder.mediaType(MediaType)
but doesn't overwrite the value if it is already set.- Overrides:
mediaTypeDefault
in classUonParserSession.Builder
- Parameters:
value
- The new value for this property.
Ifnull , then the locale defined on the context is used.- Returns:
- This object.
-
timeZone
Description copied from class:BeanSession.Builder
The session timezone.Specifies the default timezone for serializer and parser sessions.
If not specified, defaults to
BeanContext.Builder.timeZone(TimeZone)
.See Also:
- Overrides:
timeZone
in classUonParserSession.Builder
- Parameters:
value
- The new value for this property.
Can benull .- Returns:
- This object.
-
timeZoneDefault
Description copied from class:BeanSession.Builder
Same asBeanSession.Builder.timeZone(TimeZone)
but doesn't overwrite the value if it is already set.- Overrides:
timeZoneDefault
in classUonParserSession.Builder
- Parameters:
value
- The new value for this property.
Ifnull , then the locale defined on the context is used.- Returns:
- This object.
-
javaMethod
Description copied from class:ParserSession.Builder
The java method that called this serializer, usually the method in a REST servlet.- Overrides:
javaMethod
in classUonParserSession.Builder
- Parameters:
value
- The new property value.
Can benull .- Returns:
- This object.
-
outer
Description copied from class:ParserSession.Builder
The outer object for instantiating top-level non-static inner classes.- Overrides:
outer
in classUonParserSession.Builder
- Parameters:
value
- The new property value.
Can benull .- Returns:
- This object.
-
schema
Description copied from class:ParserSession.Builder
HTTP-part schema.Used for schema-based serializers and parsers to define additional formatting.
- Overrides:
schema
in classUonParserSession.Builder
- Parameters:
value
- The new value for this property.
Can benull .- Returns:
- This object.
-
schemaDefault
Description copied from class:ParserSession.Builder
Same asParserSession.Builder.schema(HttpPartSchema)
but doesn't overwrite the value if it is already set.- Overrides:
schemaDefault
in classUonParserSession.Builder
- Parameters:
value
- The new value for this property.
Ifnull , then the locale defined on the context is used.- Returns:
- This object.
-
fileCharset
Description copied from class:ReaderParserSession.Builder
File charset.The character set to use for reading Files from the file system.
Used when passing in files to
Parser.parse(Object, Class)
.If not specified, defaults to the JVM system default charset.
- Overrides:
fileCharset
in classUonParserSession.Builder
- Parameters:
value
- The new property value.
Can benull .- Returns:
- This object.
-
streamCharset
Description copied from class:ReaderParserSession.Builder
Input stream charset.The character set to use for converting InputStreams and byte arrays to readers.
Used when passing in input streams and byte arrays to
Parser.parse(Object, Class)
.If not specified, defaults to UTF-8.
- Overrides:
streamCharset
in classUonParserSession.Builder
- Parameters:
value
- The new property value.
Can benull .- Returns:
- This object.
-
decoding
Description copied from class:UonParserSession.Builder
Overrides the decoding flag on the context for this session.- Overrides:
decoding
in classUonParserSession.Builder
- Parameters:
value
- The new value for this setting.- Returns:
- This object.
-