All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.picocontainer.script.groovy.nodes.ClassLoaderNode Maven / Gradle / Ivy

The newest version!
/*******************************************************************************
 * Copyright (C) PicoContainer Organization. All rights reserved.
 * ---------------------------------------------------------------------------
 * The software in this package is published under the terms of the BSD style
 * license a copy of which has been included with this distribution in the
 * LICENSE.txt file. 
 ******************************************************************************/
package org.picocontainer.script.groovy.nodes;

import java.util.Map;

import org.picocontainer.classname.DefaultClassLoadingPicoContainer;
import org.picocontainer.classname.ClassLoadingPicoContainer;

/**
 * @author Paul Hammant
 */
@SuppressWarnings("serial")
public class ClassLoaderNode extends AbstractBuilderNode {

    public static final String NODE_NAME = "classLoader";

    public ClassLoaderNode() {
        super(NODE_NAME);
    }

    public Object createNewNode(Object current, Map attributes) {

        ClassLoadingPicoContainer container = (ClassLoadingPicoContainer) current;
        return new DefaultClassLoadingPicoContainer(container.getComponentClassLoader(), container);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy