Input - handler input type.Output - handler output type.public class BaseExceptionMapper<Input,Output> extends Object implements GenericExceptionMapper<Input,Output>
| Modifier and Type | Class and Description |
|---|---|
static class |
BaseExceptionMapper.Builder<Input,Output,Self extends BaseExceptionMapper.Builder<Input,Output,Self>>
Base Exception Mapper Builder.
|
| Modifier and Type | Field and Description |
|---|---|
protected List<GenericExceptionHandler<Input,Output>> |
exceptionHandlers
List of exception handlers.
|
| Modifier | Constructor and Description |
|---|---|
protected |
BaseExceptionMapper(List<GenericExceptionHandler<Input,Output>> exceptionHandlers)
Constructor of BaseExceptionMapper.
|
| Modifier and Type | Method and Description |
|---|---|
static <Input,Output> |
builder()
Returns an instance of Builder.
|
static <Input,Output,Self extends BaseExceptionMapper.Builder<Input,Output,Self>> |
forTypes(Class<Input> input,
Class<Output> output)
Returns an instance of Builder.
|
Optional<GenericExceptionHandler<Input,Output>> |
getHandler(Input input,
Throwable ex)
Returns a suitable exception handler to dispatch the specified exception, if one exists.
|
protected final List<GenericExceptionHandler<Input,Output>> exceptionHandlers
protected BaseExceptionMapper(List<GenericExceptionHandler<Input,Output>> exceptionHandlers)
exceptionHandlers - list of exception handlers.public Optional<GenericExceptionHandler<Input,Output>> getHandler(Input input, Throwable ex)
getHandler in interface GenericExceptionMapper<Input,Output>input - handler inputex - the exception that was originally thrownpublic static <Input,Output,Self extends BaseExceptionMapper.Builder<Input,Output,Self>> BaseExceptionMapper.Builder<Input,Output,Self> forTypes(Class<Input> input, Class<Output> output)
Input - Skill input type.Output - Skill output type.Self - of type Builder.input - class of type Input.output - class of type Output.BaseExceptionMapper.Builder.public static <Input,Output> BaseExceptionMapper.Builder<Input,Output,?> builder()
Input - Skill input type.Output - Skill output type.BaseExceptionMapper.Builder.Copyright © 2023. All rights reserved.