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 * Original code by * 009 *****************************************************************************/ 010 package org.picocontainer.lifecycle; 011 012 import java.io.Serializable; 013 014 import org.picocontainer.LifecycleStrategy; 015 016 /** 017 * Lifecycle strategy that does nothing. 018 * 019 */ 020 @SuppressWarnings("serial") 021 public class NullLifecycleStrategy implements LifecycleStrategy, Serializable { 022 023 024 /** {@inheritDoc} **/ 025 public void start(final Object component) { 026 //Does nothing 027 } 028 029 /** {@inheritDoc} **/ 030 public void stop(final Object component) { 031 //Does nothing 032 } 033 034 /** {@inheritDoc} **/ 035 public void dispose(final Object component) { 036 //Does nothing 037 } 038 039 /** {@inheritDoc} **/ 040 public boolean hasLifecycle(final Class<?> type) { 041 return false; 042 } 043 }