1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.bremersee.exception.model;
18
19 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
20 import com.fasterxml.jackson.annotation.JsonInclude;
21 import com.fasterxml.jackson.annotation.JsonInclude.Include;
22 import com.fasterxml.jackson.annotation.JsonProperty;
23
24
25 import io.swagger.v3.oas.annotations.media.Schema;
26 import java.io.Serial;
27 import java.io.Serializable;
28 import java.util.List;
29 import lombok.Builder;
30 import lombok.EqualsAndHashCode;
31 import lombok.Getter;
32 import lombok.NoArgsConstructor;
33 import lombok.Setter;
34 import lombok.ToString;
35 import tools.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
36 import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty;
37
38
39
40
41
42
43 @Schema(description = "The handler where the exception occurred.")
44 @JsonIgnoreProperties(ignoreUnknown = true)
45 @JsonInclude(Include.NON_EMPTY)
46 @EqualsAndHashCode
47 @ToString
48 @Getter
49 @Setter
50 @NoArgsConstructor
51 public class Handler implements Serializable {
52
53 @Serial
54 private static final long serialVersionUID = 1L;
55
56
57
58
59 @Schema(description = "The class name of the handler.")
60 private String className;
61
62
63
64
65 @Schema(description = "The method name of the handler.")
66 private String methodName;
67
68
69
70
71 @JsonProperty("methodParameterTypes")
72 @JacksonXmlElementWrapper(localName = "methodParameterTypes")
73 @JacksonXmlProperty(localName = "methodParameterType")
74 @Schema(description = "The method parameters.")
75 private List<String> methodParameterTypes;
76
77
78
79
80
81
82
83
84 @Builder(toBuilder = true)
85 protected Handler(
86 String className,
87 String methodName,
88 List<String> methodParameterTypes) {
89 this.className = className;
90 this.methodName = methodName;
91 this.methodParameterTypes = methodParameterTypes;
92 }
93
94 }
95