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
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableExceptionMappingConfig. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableExceptionMappingConfig.Creates an immutable copy of aRestApiExceptionMapperProperties.ExceptionMappingConfigvalue.booleanThis instance is equal to all instances ofImmutableExceptionMappingConfigthat 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.inthashCode()Computes a hash code from attributes:exceptionClassName,includeMessage,includeException,includeApplicationName,includePath,includeHandler,includeStackTrace,includeCause,evaluateAnnotationFirst.toString()Prints the immutable valueExceptionMappingConfigwith attribute values.Copy the current immutable object by setting a value for theevaluateAnnotationFirstattribute.withExceptionClassName(String value) Copy the current immutable object by setting a value for theexceptionClassNameattribute.Copy the current immutable object by setting a value for theincludeApplicationNameattribute.withIncludeCause(Boolean value) Copy the current immutable object by setting a value for theincludeCauseattribute.withIncludeException(Boolean value) Copy the current immutable object by setting a value for theincludeExceptionattribute.withIncludeHandler(Boolean value) Copy the current immutable object by setting a value for theincludeHandlerattribute.withIncludeMessage(Boolean value) Copy the current immutable object by setting a value for theincludeMessageattribute.withIncludePath(Boolean value) Copy the current immutable object by setting a value for theincludePathattribute.withIncludeStackTrace(Boolean value) Copy the current immutable object by setting a value for theincludeStackTraceattribute.
-
Method Details
-
getExceptionClassName
Gets exception class name.- Specified by:
getExceptionClassNamein interfaceRestApiExceptionMapperProperties.ExceptionMappingConfig- Returns:
- the exception class name
-
getIncludeMessage
Determines whether to include the message into the http output or not.- Specified by:
getIncludeMessagein interfaceRestApiExceptionMapperProperties.ExceptionMappingConfig- Returns:
- the boolean
-
getIncludeException
Is include exception class name.- Specified by:
getIncludeExceptionin interfaceRestApiExceptionMapperProperties.ExceptionMappingConfig- Returns:
- the boolean
-
getIncludeApplicationName
Is include application name.- Specified by:
getIncludeApplicationNamein interfaceRestApiExceptionMapperProperties.ExceptionMappingConfig- Returns:
- the boolean
-
getIncludePath
Is include path.- Specified by:
getIncludePathin interfaceRestApiExceptionMapperProperties.ExceptionMappingConfig- Returns:
- the boolean
-
getIncludeHandler
Is include handler.- Specified by:
getIncludeHandlerin interfaceRestApiExceptionMapperProperties.ExceptionMappingConfig- Returns:
- the boolean
-
getIncludeStackTrace
Is include stack trace.- Specified by:
getIncludeStackTracein interfaceRestApiExceptionMapperProperties.ExceptionMappingConfig- Returns:
- the boolean
-
getIncludeCause
Is include cause.- Specified by:
getIncludeCausein interfaceRestApiExceptionMapperProperties.ExceptionMappingConfig- Returns:
- the boolean
-
getEvaluateAnnotationFirst
Is evaluate annotation first.- Specified by:
getEvaluateAnnotationFirstin interfaceRestApiExceptionMapperProperties.ExceptionMappingConfig- Returns:
- the boolean
-
withExceptionClassName
Copy the current immutable object by setting a value for theexceptionClassNameattribute. 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
thisobject
-
withIncludeMessage
Copy the current immutable object by setting a value for theincludeMessageattribute. 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
thisobject
-
withIncludeException
Copy the current immutable object by setting a value for theincludeExceptionattribute. 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
thisobject
-
withIncludeApplicationName
Copy the current immutable object by setting a value for theincludeApplicationNameattribute. 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
thisobject
-
withIncludePath
Copy the current immutable object by setting a value for theincludePathattribute. 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
thisobject
-
withIncludeHandler
Copy the current immutable object by setting a value for theincludeHandlerattribute. 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
thisobject
-
withIncludeStackTrace
Copy the current immutable object by setting a value for theincludeStackTraceattribute. 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
thisobject
-
withIncludeCause
Copy the current immutable object by setting a value for theincludeCauseattribute. 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
thisobject
-
withEvaluateAnnotationFirst
Copy the current immutable object by setting a value for theevaluateAnnotationFirstattribute. 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
thisobject
-
equals
This instance is equal to all instances ofImmutableExceptionMappingConfigthat 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 valueExceptionMappingConfigwith attribute values. -
copyOf
public static ImmutableExceptionMappingConfig copyOf(RestApiExceptionMapperProperties.ExceptionMappingConfig instance) Creates an immutable copy of aRestApiExceptionMapperProperties.ExceptionMappingConfigvalue. 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) // requiredexceptionClassName.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
-