View Javadoc
1   /*
2    * Logback: the reliable, generic, fast and flexible logging framework.
3    * Copyright (C) 1999-2023, QOS.ch. All rights reserved.
4    *
5    * This program and the accompanying materials are dual-licensed under
6    * either the terms of the Eclipse Public License v1.0 as published by
7    * the Eclipse Foundation
8    *
9    *   or (per the licensee's choosing)
10   *
11   * under the terms of the GNU Lesser General Public License version 2.1
12   * as published by the Free Software Foundation.
13   */
14  package ch.qos.logback.classic.spi;
15  
16  import ch.qos.logback.classic.spi.IThrowableProxy;
17  import ch.qos.logback.classic.spi.StackTraceElementProxy;
18  import com.fasterxml.jackson.annotation.JsonAlias;
19  
20  import java.util.Arrays;
21  
22  public class PubThrowableProxy implements IThrowableProxy {
23  
24      private String className;
25      private String message;
26      private int commonFramesCount;
27  
28      @JsonAlias("stepArray")
29      private StackTraceElementProxy[] stackTraceElementProxyArray;
30      private PubThrowableProxy cause;
31      private PubThrowableProxy[] suppressed;
32      private boolean cyclic;
33  
34      public String getClassName() {
35          return className;
36      }
37  
38      public void setClassName(String className) {
39          this.className = className;
40      }
41  
42      public String getMessage() {
43          return message;
44      }
45  
46      public void setMessage(String message) {
47          this.message = message;
48      }
49  
50      public int getCommonFrames() {
51          return commonFramesCount;
52      }
53  
54      public void setCommonFramesCount(int commonFramesCount) {
55          this.commonFramesCount = commonFramesCount;
56      }
57  
58      public StackTraceElementProxy[] getStackTraceElementProxyArray() {
59          return stackTraceElementProxyArray;
60      }
61  
62      public void setStackTraceElementProxyArray(StackTraceElementProxy[] stackTraceElementProxyArray) {
63          this.stackTraceElementProxyArray = stackTraceElementProxyArray;
64      }
65  
66      public PubThrowableProxy getCause() {
67          return cause;
68      }
69  
70      public void setCause(PubThrowableProxy cause) {
71          this.cause = cause;
72      }
73  
74      public PubThrowableProxy[] getSuppressed() {
75          return suppressed;
76      }
77  
78      public void setSuppressed(PubThrowableProxy[] suppressed) {
79          this.suppressed = suppressed;
80      }
81  
82      public boolean isCyclic() {
83          return cyclic;
84      }
85  
86      public void setCyclic(boolean cyclic) {
87          this.cyclic = cyclic;
88      }
89  
90      @Override
91      public String toString() {
92          return "PubThrowableProxy{" + "className='" + className + '\'' + ", message='" + message + '\''
93                  + ", commonFramesCount=" + commonFramesCount + ", stackTraceElementProxyArray=" + Arrays.toString(
94                  stackTraceElementProxyArray) + ", cause=" + cause + ", suppressed=" + Arrays.toString(suppressed)
95                  + ", cyclic=" + cyclic + '}';
96      }
97  }