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.core.joran.replay;
15  
16  import ch.qos.logback.core.spi.ContextAwareBase;
17  
18  public class FruitShell extends ContextAwareBase {
19  
20      FruitFactory fruitFactory;
21      String name;
22  
23      public void setFruitFactory(FruitFactory fruitFactory) {
24          this.fruitFactory = fruitFactory;
25      }
26  
27      void testFruit() {
28  
29          Fruit fruit = fruitFactory.buildFruit();
30          System.out.println(fruit);
31      }
32  
33      public String getName() {
34          return name;
35      }
36  
37      public void setName(String name) {
38          this.name = name;
39      }
40  
41      /**
42       * Constructs a <code>String</code> with all attributes
43       * in name = value format.
44       *
45       * @return a <code>String</code> representation 
46       * of this object.
47       */
48      public String toString() {
49          final String TAB = " ";
50  
51          String retValue = "";
52  
53          retValue = "FruitShell ( " + "fruitFactory = " + this.fruitFactory + TAB + "name = " + this.name + TAB + " )";
54  
55          return retValue;
56      }
57  
58  }