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 io.swagger.v3.oas.annotations.media.Schema;
23 import java.io.Serial;
24 import java.io.Serializable;
25 import lombok.Builder;
26 import lombok.EqualsAndHashCode;
27 import lombok.Getter;
28 import lombok.NoArgsConstructor;
29 import lombok.Setter;
30 import lombok.ToString;
31
32
33
34
35
36
37 @Schema(description = "A stack trace element of an exception.")
38 @JsonIgnoreProperties(ignoreUnknown = true)
39 @JsonInclude(Include.NON_EMPTY)
40 @EqualsAndHashCode
41 @ToString
42 @Getter
43 @Setter
44 @NoArgsConstructor
45 public class StackTraceItem implements Serializable {
46
47 @Serial
48 private static final long serialVersionUID = 1L;
49
50
51
52
53 @Schema(description = "The declaring class.")
54 private String declaringClass;
55
56
57
58
59 @Schema(description = "The method name.")
60 private String methodName;
61
62
63
64
65 @Schema(description = "The file name.")
66 private String fileName;
67
68
69
70
71 @Schema(description = "The line number.")
72 private Integer lineNumber;
73
74
75
76
77
78
79
80
81
82 @Builder(toBuilder = true)
83 protected StackTraceItem(
84 String declaringClass,
85 String methodName,
86 String fileName,
87 Integer lineNumber) {
88 this.declaringClass = declaringClass;
89 this.methodName = methodName;
90 this.fileName = fileName;
91 this.lineNumber = lineNumber;
92 }
93
94 }