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.behaviors;
010
011 import org.picocontainer.ComponentAdapter;
012 import org.picocontainer.ComponentMonitor;
013 import org.picocontainer.LifecycleStrategy;
014 import org.picocontainer.Parameter;
015 import org.picocontainer.PicoCompositionException;
016
017 import java.util.Properties;
018
019
020 /** @author Paul Hammant */
021 @SuppressWarnings("serial")
022 public class Intercepting extends AbstractBehaviorFactory {
023
024 public <T> ComponentAdapter<T> createComponentAdapter(ComponentMonitor componentMonitor,
025 LifecycleStrategy lifecycleStrategy,
026 Properties componentProperties,
027 Object componentKey,
028 Class<T> componentImplementation,
029 Parameter... parameters) throws PicoCompositionException {
030 return componentMonitor.newBehavior(new Intercepted(super.createComponentAdapter(componentMonitor,
031 lifecycleStrategy, componentProperties, componentKey,
032 componentImplementation, parameters)));
033 }
034 }