001 /*****************************************************************************
002 * Copyright (C) NanoContainer 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 Aslak Hellesoy and Paul Hammant *
009 *****************************************************************************/
010
011 package org.nanocontainer.script.xml;
012
013 import org.picocontainer.PicoContainer;
014 import org.w3c.dom.Element;
015
016 import java.net.MalformedURLException;
017
018 /**
019 * Factory that creates instances from DOM Elements
020 *
021 * @author Paul Hammant
022 * @author Marcos Tarruella
023 */
024 public interface XMLComponentInstanceFactory {
025 /**
026 * Creates an instance of an Object from a DOM Element
027 *
028 * @param container
029 * @param element the DOM Element
030 * @param classLoader
031 * @return An Object instance
032 * @throws ClassNotFoundException
033 */
034 Object makeInstance(PicoContainer container, Element element, ClassLoader classLoader) throws ClassNotFoundException, MalformedURLException;
035 }