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 *****************************************************************************/
009 package org.picocontainer.references;
010
011 import org.picocontainer.ObjectReference;
012
013 import java.io.Serializable;
014 import java.io.ObjectOutputStream;
015 import java.io.ObjectInputStream;
016
017 /**
018 * Gets and sets references on Thread Local
019 * @author Paul Hammant
020 */
021 @SuppressWarnings("serial")
022 public class ThreadLocalReference<T> extends ThreadLocal<T> implements ObjectReference<T>, Serializable {
023
024 private void writeObject(final ObjectOutputStream out) {
025 if(out != null); // eliminate warning because of unused parameter
026 }
027
028 private void readObject(final ObjectInputStream in) {
029 if(in != null); // eliminate warning because of unused parameter
030 }
031
032 }