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 toexceptionMappingConfigslist.addAllExceptionMappings(Iterable<? extends RestApiExceptionMapperProperties.ExceptionMapping> elements) Adds elements toexceptionMappingslist.Adds one element toexceptionMappingConfigslist.Adds elements toexceptionMappingConfigslist.Adds one element toexceptionMappingslist.Adds elements toexceptionMappingslist.build()Builds a newImmutableRestApiExceptionMapperProperties.defaultExceptionMapping(RestApiExceptionMapperProperties.ExceptionMapping defaultExceptionMapping) Initializes the value for thedefaultExceptionMappingattribute.defaultExceptionMappingConfig(RestApiExceptionMapperProperties.ExceptionMappingConfig defaultExceptionMappingConfig) Initializes the value for thedefaultExceptionMappingConfigattribute.exceptionMappingConfigs(Iterable<? extends RestApiExceptionMapperProperties.ExceptionMappingConfig> elements) Sets or replaces all elements forexceptionMappingConfigslist.exceptionMappings(Iterable<? extends RestApiExceptionMapperProperties.ExceptionMapping> elements) Sets or replaces all elements forexceptionMappingslist.from(RestApiExceptionMapperProperties instance) Fill a builder with attribute values from the providedRestApiExceptionMapperPropertiesinstance.
-
Method Details
-
from
public final ImmutableRestApiExceptionMapperProperties.Builder from(RestApiExceptionMapperProperties instance) Fill a builder with attribute values from the providedRestApiExceptionMapperPropertiesinstance. 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:
thisbuilder for use in a chained invocation
-
defaultExceptionMapping
public final ImmutableRestApiExceptionMapperProperties.Builder defaultExceptionMapping(RestApiExceptionMapperProperties.ExceptionMapping defaultExceptionMapping) Initializes the value for thedefaultExceptionMappingattribute.If not set, this attribute will have a default value as returned by the initializer of
defaultExceptionMapping.- Parameters:
defaultExceptionMapping- The value for defaultExceptionMapping- Returns:
thisbuilder for use in a chained invocation
-
addExceptionMappings
public final ImmutableRestApiExceptionMapperProperties.Builder addExceptionMappings(RestApiExceptionMapperProperties.ExceptionMapping element) Adds one element toexceptionMappingslist.- Parameters:
element- A exceptionMappings element- Returns:
thisbuilder for use in a chained invocation
-
addExceptionMappings
public final ImmutableRestApiExceptionMapperProperties.Builder addExceptionMappings(RestApiExceptionMapperProperties.ExceptionMapping... elements) Adds elements toexceptionMappingslist.- Parameters:
elements- An array of exceptionMappings elements- Returns:
thisbuilder for use in a chained invocation
-
exceptionMappings
public final ImmutableRestApiExceptionMapperProperties.Builder exceptionMappings(Iterable<? extends RestApiExceptionMapperProperties.ExceptionMapping> elements) Sets or replaces all elements forexceptionMappingslist.- Parameters:
elements- An iterable of exceptionMappings elements- Returns:
thisbuilder for use in a chained invocation
-
addAllExceptionMappings
public final ImmutableRestApiExceptionMapperProperties.Builder addAllExceptionMappings(Iterable<? extends RestApiExceptionMapperProperties.ExceptionMapping> elements) Adds elements toexceptionMappingslist.- Parameters:
elements- An iterable of exceptionMappings elements- Returns:
thisbuilder for use in a chained invocation
-
defaultExceptionMappingConfig
public final ImmutableRestApiExceptionMapperProperties.Builder defaultExceptionMappingConfig(RestApiExceptionMapperProperties.ExceptionMappingConfig defaultExceptionMappingConfig) Initializes the value for thedefaultExceptionMappingConfigattribute.If not set, this attribute will have a default value as returned by the initializer of
defaultExceptionMappingConfig.- Parameters:
defaultExceptionMappingConfig- The value for defaultExceptionMappingConfig- Returns:
thisbuilder for use in a chained invocation
-
addExceptionMappingConfigs
public final ImmutableRestApiExceptionMapperProperties.Builder addExceptionMappingConfigs(RestApiExceptionMapperProperties.ExceptionMappingConfig element) Adds one element toexceptionMappingConfigslist.- Parameters:
element- A exceptionMappingConfigs element- Returns:
thisbuilder for use in a chained invocation
-
addExceptionMappingConfigs
public final ImmutableRestApiExceptionMapperProperties.Builder addExceptionMappingConfigs(RestApiExceptionMapperProperties.ExceptionMappingConfig... elements) Adds elements toexceptionMappingConfigslist.- Parameters:
elements- An array of exceptionMappingConfigs elements- Returns:
thisbuilder for use in a chained invocation
-
exceptionMappingConfigs
public final ImmutableRestApiExceptionMapperProperties.Builder exceptionMappingConfigs(Iterable<? extends RestApiExceptionMapperProperties.ExceptionMappingConfig> elements) Sets or replaces all elements forexceptionMappingConfigslist.- Parameters:
elements- An iterable of exceptionMappingConfigs elements- Returns:
thisbuilder for use in a chained invocation
-
addAllExceptionMappingConfigs
public final ImmutableRestApiExceptionMapperProperties.Builder addAllExceptionMappingConfigs(Iterable<? extends RestApiExceptionMapperProperties.ExceptionMappingConfig> elements) Adds elements toexceptionMappingConfigslist.- Parameters:
elements- An iterable of exceptionMappingConfigs elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableRestApiExceptionMapperProperties.- Returns:
- An immutable instance of RestApiExceptionMapperProperties
- Throws:
IllegalStateException- if any required attributes are missing
-