Package org.bremersee.exception
Class ImmutableExceptionMappingConfig
java.lang.Object
org.bremersee.exception.ImmutableExceptionMappingConfig
- All Implemented Interfaces:
RestApiExceptionMapperProperties.ExceptionMappingConfig
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableExceptionMappingConfig
extends Object
implements RestApiExceptionMapperProperties.ExceptionMappingConfig
Immutable implementation of
RestApiExceptionMapperProperties.ExceptionMappingConfig
.
Use the builder to create immutable instances:
ImmutableExceptionMappingConfig.builder()
.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableExceptionMappingConfig
. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutableExceptionMappingConfig
.Creates an immutable copy of aRestApiExceptionMapperProperties.ExceptionMappingConfig
value.boolean
This instance is equal to all instances ofImmutableExceptionMappingConfig
that have equal attribute values.Is evaluate annotation first.Gets exception class name.Is include application name.Is include cause.Is include exception class name.Is include handler.Determines whether to include the message into the http output or not.Is include path.Is include stack trace.int
hashCode()
Computes a hash code from attributes:exceptionClassName
,includeMessage
,includeException
,includeApplicationName
,includePath
,includeHandler
,includeStackTrace
,includeCause
,evaluateAnnotationFirst
.toString()
Prints the immutable valueExceptionMappingConfig
with attribute values.Copy the current immutable object by setting a value for theevaluateAnnotationFirst
attribute.withExceptionClassName
(String value) Copy the current immutable object by setting a value for theexceptionClassName
attribute.Copy the current immutable object by setting a value for theincludeApplicationName
attribute.withIncludeCause
(Boolean value) Copy the current immutable object by setting a value for theincludeCause
attribute.withIncludeException
(Boolean value) Copy the current immutable object by setting a value for theincludeException
attribute.withIncludeHandler
(Boolean value) Copy the current immutable object by setting a value for theincludeHandler
attribute.withIncludeMessage
(Boolean value) Copy the current immutable object by setting a value for theincludeMessage
attribute.withIncludePath
(Boolean value) Copy the current immutable object by setting a value for theincludePath
attribute.withIncludeStackTrace
(Boolean value) Copy the current immutable object by setting a value for theincludeStackTrace
attribute.
-
Method Details
-
getExceptionClassName
Gets exception class name.- Specified by:
getExceptionClassName
in interfaceRestApiExceptionMapperProperties.ExceptionMappingConfig
- Returns:
- the exception class name
-
getIncludeMessage
Determines whether to include the message into the http output or not.- Specified by:
getIncludeMessage
in interfaceRestApiExceptionMapperProperties.ExceptionMappingConfig
- Returns:
- the boolean
-
getIncludeException
Is include exception class name.- Specified by:
getIncludeException
in interfaceRestApiExceptionMapperProperties.ExceptionMappingConfig
- Returns:
- the boolean
-
getIncludeApplicationName
Is include application name.- Specified by:
getIncludeApplicationName
in interfaceRestApiExceptionMapperProperties.ExceptionMappingConfig
- Returns:
- the boolean
-
getIncludePath
Is include path.- Specified by:
getIncludePath
in interfaceRestApiExceptionMapperProperties.ExceptionMappingConfig
- Returns:
- the boolean
-
getIncludeHandler
Is include handler.- Specified by:
getIncludeHandler
in interfaceRestApiExceptionMapperProperties.ExceptionMappingConfig
- Returns:
- the boolean
-
getIncludeStackTrace
Is include stack trace.- Specified by:
getIncludeStackTrace
in interfaceRestApiExceptionMapperProperties.ExceptionMappingConfig
- Returns:
- the boolean
-
getIncludeCause
Is include cause.- Specified by:
getIncludeCause
in interfaceRestApiExceptionMapperProperties.ExceptionMappingConfig
- Returns:
- the boolean
-
getEvaluateAnnotationFirst
Is evaluate annotation first.- Specified by:
getEvaluateAnnotationFirst
in interfaceRestApiExceptionMapperProperties.ExceptionMappingConfig
- Returns:
- the boolean
-
withExceptionClassName
Copy the current immutable object by setting a value for theexceptionClassName
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for exceptionClassName- Returns:
- A modified copy of the
this
object
-
withIncludeMessage
Copy the current immutable object by setting a value for theincludeMessage
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for includeMessage- Returns:
- A modified copy of the
this
object
-
withIncludeException
Copy the current immutable object by setting a value for theincludeException
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for includeException- Returns:
- A modified copy of the
this
object
-
withIncludeApplicationName
Copy the current immutable object by setting a value for theincludeApplicationName
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for includeApplicationName- Returns:
- A modified copy of the
this
object
-
withIncludePath
Copy the current immutable object by setting a value for theincludePath
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for includePath- Returns:
- A modified copy of the
this
object
-
withIncludeHandler
Copy the current immutable object by setting a value for theincludeHandler
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for includeHandler- Returns:
- A modified copy of the
this
object
-
withIncludeStackTrace
Copy the current immutable object by setting a value for theincludeStackTrace
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for includeStackTrace- Returns:
- A modified copy of the
this
object
-
withIncludeCause
Copy the current immutable object by setting a value for theincludeCause
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for includeCause- Returns:
- A modified copy of the
this
object
-
withEvaluateAnnotationFirst
Copy the current immutable object by setting a value for theevaluateAnnotationFirst
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for evaluateAnnotationFirst- Returns:
- A modified copy of the
this
object
-
equals
This instance is equal to all instances ofImmutableExceptionMappingConfig
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:exceptionClassName
,includeMessage
,includeException
,includeApplicationName
,includePath
,includeHandler
,includeStackTrace
,includeCause
,evaluateAnnotationFirst
. -
toString
Prints the immutable valueExceptionMappingConfig
with attribute values. -
copyOf
public static ImmutableExceptionMappingConfig copyOf(RestApiExceptionMapperProperties.ExceptionMappingConfig instance) Creates an immutable copy of aRestApiExceptionMapperProperties.ExceptionMappingConfig
value. 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 ExceptionMappingConfig instance
-
builder
Creates a builder forImmutableExceptionMappingConfig
.ImmutableExceptionMappingConfig.builder() .exceptionClassName(String) // required
exceptionClassName
.includeMessage(Boolean) // optionalincludeMessage
.includeException(Boolean) // optionalincludeException
.includeApplicationName(Boolean) // optionalincludeApplicationName
.includePath(Boolean) // optionalincludePath
.includeHandler(Boolean) // optionalincludeHandler
.includeStackTrace(Boolean) // optionalincludeStackTrace
.includeCause(Boolean) // optionalincludeCause
.evaluateAnnotationFirst(Boolean) // optionalevaluateAnnotationFirst
.build();- Returns:
- A new ImmutableExceptionMappingConfig builder
-