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.ComponentAdapter;
015 import org.picocontainer.LifecycleStrategy;
016
017 /**
018 * Lifecycle strategy that does nothing.
019 *
020 */
021 @SuppressWarnings("serial")
022 public class NullLifecycleStrategy implements LifecycleStrategy, Serializable {
023
024
025 /** {@inheritDoc} **/
026 public void start(final Object component) {
027 //Does nothing
028 }
029
030 /** {@inheritDoc} **/
031 public void stop(final Object component) {
032 //Does nothing
033 }
034
035 /** {@inheritDoc} **/
036 public void dispose(final Object component) {
037 //Does nothing
038 }
039
040 /** {@inheritDoc} **/
041 public boolean hasLifecycle(final Class<?> type) {
042 return false;
043 }
044
045 public boolean isLazy(ComponentAdapter<?> adapter) {
046 return false;
047 }
048 }