Package org.bremersee.exception
Class ImmutableRestApiExceptionMapperProperties
java.lang.Object
org.bremersee.exception.ImmutableRestApiExceptionMapperProperties
- All Implemented Interfaces:
RestApiExceptionMapperProperties
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableRestApiExceptionMapperProperties
extends Object
implements RestApiExceptionMapperProperties
Immutable implementation of
RestApiExceptionMapperProperties.
Use the builder to create immutable instances:
ImmutableRestApiExceptionMapperProperties.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableRestApiExceptionMapperProperties.Nested classes/interfaces inherited from interface org.bremersee.exception.RestApiExceptionMapperProperties
RestApiExceptionMapperProperties.ExceptionMapping, RestApiExceptionMapperProperties.ExceptionMappingConfig -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableRestApiExceptionMapperProperties.copyOf(RestApiExceptionMapperProperties instance) Creates an immutable copy of aRestApiExceptionMapperPropertiesvalue.booleanThis instance is equal to all instances ofImmutableRestApiExceptionMapperPropertiesthat have equal attribute values.Gets default exception mapping.Gets default exception mapping config.Gets exception mapping configs.Gets exception mappings.inthashCode()Computes a hash code from attributes:defaultExceptionMapping,exceptionMappings,defaultExceptionMappingConfig,exceptionMappingConfigs.toString()Prints the immutable valueRestApiExceptionMapperPropertieswith attribute values.Copy the current immutable object by setting a value for thedefaultExceptionMappingattribute.Copy the current immutable object by setting a value for thedefaultExceptionMappingConfigattribute.withExceptionMappingConfigs(Iterable<? extends RestApiExceptionMapperProperties.ExceptionMappingConfig> elements) Copy the current immutable object with elements that replace the content ofexceptionMappingConfigs.Copy the current immutable object with elements that replace the content ofexceptionMappingConfigs.withExceptionMappings(Iterable<? extends RestApiExceptionMapperProperties.ExceptionMapping> elements) Copy the current immutable object with elements that replace the content ofexceptionMappings.Copy the current immutable object with elements that replace the content ofexceptionMappings.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.bremersee.exception.RestApiExceptionMapperProperties
findExceptionMapping, findExceptionMappingConfig
-
Method Details
-
getDefaultExceptionMapping
Gets default exception mapping.- Specified by:
getDefaultExceptionMappingin interfaceRestApiExceptionMapperProperties- Returns:
- the default exception mapping
-
getExceptionMappings
Gets exception mappings.- Specified by:
getExceptionMappingsin interfaceRestApiExceptionMapperProperties- Returns:
- the exception mappings
-
getDefaultExceptionMappingConfig
Gets default exception mapping config.- Specified by:
getDefaultExceptionMappingConfigin interfaceRestApiExceptionMapperProperties- Returns:
- the default exception mapping config
-
getExceptionMappingConfigs
Gets exception mapping configs.- Specified by:
getExceptionMappingConfigsin interfaceRestApiExceptionMapperProperties- Returns:
- the exception mapping configs
-
withDefaultExceptionMapping
public final ImmutableRestApiExceptionMapperProperties withDefaultExceptionMapping(RestApiExceptionMapperProperties.ExceptionMapping value) Copy the current immutable object by setting a value for thedefaultExceptionMappingattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for defaultExceptionMapping- Returns:
- A modified copy of the
thisobject
-
withExceptionMappings
public final ImmutableRestApiExceptionMapperProperties withExceptionMappings(RestApiExceptionMapperProperties.ExceptionMapping... elements) Copy the current immutable object with elements that replace the content ofexceptionMappings.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withExceptionMappings
public final ImmutableRestApiExceptionMapperProperties withExceptionMappings(Iterable<? extends RestApiExceptionMapperProperties.ExceptionMapping> elements) Copy the current immutable object with elements that replace the content ofexceptionMappings. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of exceptionMappings elements to set- Returns:
- A modified copy of
thisobject
-
withDefaultExceptionMappingConfig
public final ImmutableRestApiExceptionMapperProperties withDefaultExceptionMappingConfig(RestApiExceptionMapperProperties.ExceptionMappingConfig value) Copy the current immutable object by setting a value for thedefaultExceptionMappingConfigattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for defaultExceptionMappingConfig- Returns:
- A modified copy of the
thisobject
-
withExceptionMappingConfigs
public final ImmutableRestApiExceptionMapperProperties withExceptionMappingConfigs(RestApiExceptionMapperProperties.ExceptionMappingConfig... elements) Copy the current immutable object with elements that replace the content ofexceptionMappingConfigs.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withExceptionMappingConfigs
public final ImmutableRestApiExceptionMapperProperties withExceptionMappingConfigs(Iterable<? extends RestApiExceptionMapperProperties.ExceptionMappingConfig> elements) Copy the current immutable object with elements that replace the content ofexceptionMappingConfigs. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of exceptionMappingConfigs elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableRestApiExceptionMapperPropertiesthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:defaultExceptionMapping,exceptionMappings,defaultExceptionMappingConfig,exceptionMappingConfigs. -
toString
Prints the immutable valueRestApiExceptionMapperPropertieswith attribute values. -
copyOf
public static ImmutableRestApiExceptionMapperProperties copyOf(RestApiExceptionMapperProperties instance) Creates an immutable copy of aRestApiExceptionMapperPropertiesvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable RestApiExceptionMapperProperties instance
-
builder
Creates a builder forImmutableRestApiExceptionMapperProperties.ImmutableRestApiExceptionMapperProperties.builder() .defaultExceptionMapping(org.bremersee.exception.RestApiExceptionMapperProperties.ExceptionMapping) // optionaldefaultExceptionMapping.addExceptionMappings|addAllExceptionMappings(org.bremersee.exception.RestApiExceptionMapperProperties.ExceptionMapping) //exceptionMappingselements .defaultExceptionMappingConfig(org.bremersee.exception.RestApiExceptionMapperProperties.ExceptionMappingConfig) // optionaldefaultExceptionMappingConfig.addExceptionMappingConfigs|addAllExceptionMappingConfigs(org.bremersee.exception.RestApiExceptionMapperProperties.ExceptionMappingConfig) //exceptionMappingConfigselements .build();- Returns:
- A new ImmutableRestApiExceptionMapperProperties builder
-