1 /****************************************************************************** 2 * Copyright (C) PicoContainer Organization. All rights reserved. * 3 * ------------------------------------------------------------------------- * 4 * The software in this package is published under the terms of the BSD * 5 * style license a copy of which has been included with this distribution in * 6 * the LICENSE.txt file. * 7 * * 8 * Idea by Rachel Davies, Original code by Aslak Hellesoy and Paul Hammant * 9 *****************************************************************************/ 10 11 package org.picocontainer.testmodel; 12 13 import junit.framework.Assert; 14 15 import java.io.Externalizable; 16 import java.io.ObjectInput; 17 import java.io.IOException; 18 import java.io.ObjectOutput; 19 20 /*** 21 * @author steve.freeman@m3p.co.uk 22 */ 23 public class DependsOnTouchable implements Externalizable { 24 public Touchable touchable; 25 26 // to satify Externalizable 27 public DependsOnTouchable() { 28 } 29 30 public DependsOnTouchable(Touchable touchable) { 31 Assert.assertNotNull("Touchable cannot be passed in as null", touchable); 32 touchable.wasTouched(); 33 this.touchable = touchable; 34 } 35 36 public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { 37 // whatever 38 } 39 40 public void writeExternal(ObjectOutput out) throws IOException { 41 // whatever 42 } 43 44 public Object getTouchable() { 45 return touchable; 46 } 47 48 49 }

This page was automatically generated by Maven