1   package ch.qos.logback.core.joran.replay;
2   
3   import ch.qos.logback.core.spi.ContextAwareBase;
4   
5   public class FruitShell extends ContextAwareBase {
6   
7     FruitFactory fruitFactory;
8     String name;
9     
10    public void setFruitFactory(FruitFactory fruitFactory) {
11      this.fruitFactory = fruitFactory;
12    }
13  
14    void testFruit() {
15      
16      Fruit fruit = fruitFactory.buildFruit();
17      System.out.println(fruit);
18    }
19  
20    public String getName() {
21      return name;
22    }
23  
24    public void setName(String name) {
25      this.name = name;
26    }
27  
28    /**
29     * Constructs a <code>String</code> with all attributes
30     * in name = value format.
31     *
32     * @return a <code>String</code> representation 
33     * of this object.
34     */
35    public String toString()
36    {
37        final String TAB = " ";
38        
39        String retValue = "";
40        
41        retValue = "FruitShell ( "
42            + "fruitFactory = " + this.fruitFactory + TAB
43            + "name = " + this.name + TAB
44            + " )";
45        
46        return retValue;
47    }
48    
49  }