001 /******************************************************************************* 002 * Copyright (C) PicoContainer Organization. All rights reserved. 003 * --------------------------------------------------------------------------- 004 * The software in this package is published under the terms of the BSD style 005 * license a copy of which has been included with this distribution in the 006 * LICENSE.txt file. 007 ******************************************************************************/ 008 package org.picocontainer.script; 009 010 import org.picocontainer.Characteristics; 011 import org.picocontainer.DefaultPicoContainer; 012 import org.picocontainer.PicoContainer; 013 014 /** 015 * Default builder creates an empty caching DefaultPicoContainer 016 */ 017 public class DefaultContainerBuilder extends AbstractContainerBuilder { 018 019 public DefaultContainerBuilder() { 020 } 021 022 // TODO better solution to activate default caching 023 protected PicoContainer createContainer(PicoContainer parentContainer, Object assemblyScope) { 024 return (new DefaultPicoContainer(parentContainer)).change(Characteristics.CACHE); 025 } 026 }