Package org.bremersee.exception
Class ImmutableRestApiExceptionMapperProperties.Builder
java.lang.Object
org.bremersee.exception.ImmutableRestApiExceptionMapperProperties.Builder
- Enclosing class:
- ImmutableRestApiExceptionMapperProperties
Builds instances of type
ImmutableRestApiExceptionMapperProperties
.
Initialize attributes and then invoke the build()
method to create an
immutable instance.
Builder
is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionaddAllExceptionMappingConfigs
(Iterable<? extends RestApiExceptionMapperProperties.ExceptionMappingConfig> elements) Adds elements toexceptionMappingConfigs
list.addAllExceptionMappings
(Iterable<? extends RestApiExceptionMapperProperties.ExceptionMapping> elements) Adds elements toexceptionMappings
list.Adds one element toexceptionMappingConfigs
list.Adds elements toexceptionMappingConfigs
list.Adds one element toexceptionMappings
list.Adds elements toexceptionMappings
list.build()
Builds a newImmutableRestApiExceptionMapperProperties
.defaultExceptionMapping
(RestApiExceptionMapperProperties.ExceptionMapping defaultExceptionMapping) Initializes the value for thedefaultExceptionMapping
attribute.defaultExceptionMappingConfig
(RestApiExceptionMapperProperties.ExceptionMappingConfig defaultExceptionMappingConfig) Initializes the value for thedefaultExceptionMappingConfig
attribute.exceptionMappingConfigs
(Iterable<? extends RestApiExceptionMapperProperties.ExceptionMappingConfig> elements) Sets or replaces all elements forexceptionMappingConfigs
list.exceptionMappings
(Iterable<? extends RestApiExceptionMapperProperties.ExceptionMapping> elements) Sets or replaces all elements forexceptionMappings
list.from
(RestApiExceptionMapperProperties instance) Fill a builder with attribute values from the providedRestApiExceptionMapperProperties
instance.
-
Method Details
-
from
public final ImmutableRestApiExceptionMapperProperties.Builder from(RestApiExceptionMapperProperties instance) Fill a builder with attribute values from the providedRestApiExceptionMapperProperties
instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
defaultExceptionMapping
public final ImmutableRestApiExceptionMapperProperties.Builder defaultExceptionMapping(RestApiExceptionMapperProperties.ExceptionMapping defaultExceptionMapping) Initializes the value for thedefaultExceptionMapping
attribute.If not set, this attribute will have a default value as returned by the initializer of
defaultExceptionMapping
.- Parameters:
defaultExceptionMapping
- The value for defaultExceptionMapping- Returns:
this
builder for use in a chained invocation
-
addExceptionMappings
public final ImmutableRestApiExceptionMapperProperties.Builder addExceptionMappings(RestApiExceptionMapperProperties.ExceptionMapping element) Adds one element toexceptionMappings
list.- Parameters:
element
- A exceptionMappings element- Returns:
this
builder for use in a chained invocation
-
addExceptionMappings
public final ImmutableRestApiExceptionMapperProperties.Builder addExceptionMappings(RestApiExceptionMapperProperties.ExceptionMapping... elements) Adds elements toexceptionMappings
list.- Parameters:
elements
- An array of exceptionMappings elements- Returns:
this
builder for use in a chained invocation
-
exceptionMappings
public final ImmutableRestApiExceptionMapperProperties.Builder exceptionMappings(Iterable<? extends RestApiExceptionMapperProperties.ExceptionMapping> elements) Sets or replaces all elements forexceptionMappings
list.- Parameters:
elements
- An iterable of exceptionMappings elements- Returns:
this
builder for use in a chained invocation
-
addAllExceptionMappings
public final ImmutableRestApiExceptionMapperProperties.Builder addAllExceptionMappings(Iterable<? extends RestApiExceptionMapperProperties.ExceptionMapping> elements) Adds elements toexceptionMappings
list.- Parameters:
elements
- An iterable of exceptionMappings elements- Returns:
this
builder for use in a chained invocation
-
defaultExceptionMappingConfig
public final ImmutableRestApiExceptionMapperProperties.Builder defaultExceptionMappingConfig(RestApiExceptionMapperProperties.ExceptionMappingConfig defaultExceptionMappingConfig) Initializes the value for thedefaultExceptionMappingConfig
attribute.If not set, this attribute will have a default value as returned by the initializer of
defaultExceptionMappingConfig
.- Parameters:
defaultExceptionMappingConfig
- The value for defaultExceptionMappingConfig- Returns:
this
builder for use in a chained invocation
-
addExceptionMappingConfigs
public final ImmutableRestApiExceptionMapperProperties.Builder addExceptionMappingConfigs(RestApiExceptionMapperProperties.ExceptionMappingConfig element) Adds one element toexceptionMappingConfigs
list.- Parameters:
element
- A exceptionMappingConfigs element- Returns:
this
builder for use in a chained invocation
-
addExceptionMappingConfigs
public final ImmutableRestApiExceptionMapperProperties.Builder addExceptionMappingConfigs(RestApiExceptionMapperProperties.ExceptionMappingConfig... elements) Adds elements toexceptionMappingConfigs
list.- Parameters:
elements
- An array of exceptionMappingConfigs elements- Returns:
this
builder for use in a chained invocation
-
exceptionMappingConfigs
public final ImmutableRestApiExceptionMapperProperties.Builder exceptionMappingConfigs(Iterable<? extends RestApiExceptionMapperProperties.ExceptionMappingConfig> elements) Sets or replaces all elements forexceptionMappingConfigs
list.- Parameters:
elements
- An iterable of exceptionMappingConfigs elements- Returns:
this
builder for use in a chained invocation
-
addAllExceptionMappingConfigs
public final ImmutableRestApiExceptionMapperProperties.Builder addAllExceptionMappingConfigs(Iterable<? extends RestApiExceptionMapperProperties.ExceptionMappingConfig> elements) Adds elements toexceptionMappingConfigs
list.- Parameters:
elements
- An iterable of exceptionMappingConfigs elements- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableRestApiExceptionMapperProperties
.- Returns:
- An immutable instance of RestApiExceptionMapperProperties
- Throws:
IllegalStateException
- if any required attributes are missing
-