001/**
002 * Logback: the reliable, generic, fast and flexible logging framework.
003 * Copyright (C) 1999-2015, QOS.ch. All rights reserved.
004 *
005 * This program and the accompanying materials are dual-licensed under
006 * either the terms of the Eclipse Public License v1.0 as published by
007 * the Eclipse Foundation
008 *
009 *   or (per the licensee's choosing)
010 *
011 * under the terms of the GNU Lesser General Public License version 2.1
012 * as published by the Free Software Foundation.
013 */
014package ch.qos.logback.classic.spi.special;
015
016import ch.qos.logback.classic.spi.CPDCSpecial;
017import ch.qos.logback.classic.spi.IThrowableProxy;
018import ch.qos.logback.classic.spi.PackagingDataCalculator;
019import ch.qos.logback.classic.spi.ThrowableProxy;
020
021public class CPDCSpecialImpl implements CPDCSpecial {
022
023    Throwable throwable;
024    IThrowableProxy throwableProxy;
025
026    public void doTest() {
027        nesting();
028    }
029
030    private void nesting() {
031        throwable = new Throwable("x");
032        throwableProxy = new ThrowableProxy(throwable);
033        PackagingDataCalculator pdc = new PackagingDataCalculator();
034        pdc.calculate(throwableProxy);
035    }
036
037    public Throwable getThrowable() {
038        return throwable;
039    }
040
041    public IThrowableProxy getThrowableProxy() {
042        return throwableProxy;
043    }
044}