001    /*****************************************************************************
002     * Copyright (c) PicoContainer Organization. All rights reserved.            *
003     * ------------------------------------------------------------------------- *
004     * The software in this package is published under the terms of the BSD      *
005     * style license a copy of which has been included with this distribution in *
006     * the LICENSE.txt file.                                                     *
007     *                                                                           *
008     * Idea by Rachel Davies, Original code by Aslak Hellesoy and Paul Hammant   *
009     *****************************************************************************/
010    
011    package org.picocontainer.testmodel;
012    
013    import java.io.Serializable;
014    
015    import junit.framework.Assert;
016    
017    /**
018     * @author steve.freeman@m3p.co.uk
019     */
020    @SuppressWarnings("serial")
021    public class DependsOnTouchable implements Serializable {
022        public final Touchable touchable;
023    
024        public DependsOnTouchable(Touchable touchable) {
025            Assert.assertNotNull("Touchable cannot be passed in as null", touchable);
026            touchable.touch();
027            this.touchable = touchable;
028        }
029    
030        public Touchable getTouchable() {
031            return touchable;
032        }
033    }