View Javadoc
1   /**
2    * Logback: the reliable, generic, fast and flexible logging framework.
3    * Copyright (C) 1999-2015, 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.special;
15  
16  import ch.qos.logback.classic.spi.CPDCSpecial;
17  import ch.qos.logback.classic.spi.IThrowableProxy;
18  import ch.qos.logback.classic.spi.PackagingDataCalculator;
19  import ch.qos.logback.classic.spi.ThrowableProxy;
20  
21  public class CPDCSpecialImpl implements CPDCSpecial {
22  
23      Throwable throwable;
24      IThrowableProxy throwableProxy;
25  
26      public void doTest() {
27          nesting();
28      }
29  
30      private void nesting() {
31          throwable = new Throwable("x");
32          throwableProxy = new ThrowableProxy(throwable);
33          PackagingDataCalculator pdc = new PackagingDataCalculator();
34          pdc.calculate(throwableProxy);
35      }
36  
37      public Throwable getThrowable() {
38          return throwable;
39      }
40  
41      public IThrowableProxy getThrowableProxy() {
42          return throwableProxy;
43      }
44  }