Return-Path: Delivered-To: apmail-xml-cocoon-cvs-archive@xml.apache.org Received: (qmail 64370 invoked by uid 500); 13 Mar 2002 18:59:20 -0000 Mailing-List: contact cocoon-cvs-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: cocoon-dev@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cocoon-cvs@xml.apache.org Received: (qmail 64361 invoked by uid 500); 13 Mar 2002 18:59:20 -0000 Delivered-To: apmail-xml-cocoon2-cvs@apache.org Date: 13 Mar 2002 18:59:19 -0000 Message-ID: <20020313185919.48665.qmail@icarus.apache.org> From: ovidiu@apache.org To: xml-cocoon2-cvs@apache.org Subject: cvs commit: xml-cocoon2/src/scratchpad/schecoon/src/org/apache/cocoon/components/flow InterpreterSelector.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ovidiu 02/03/13 10:59:19 Added: src/scratchpad/schecoon/src/org/apache/cocoon/components/flow InterpreterSelector.java Log: Selector of different flow control interpreters. Revision Changes Path 1.1 xml-cocoon2/src/scratchpad/schecoon/src/org/apache/cocoon/components/flow/InterpreterSelector.java Index: InterpreterSelector.java =================================================================== package org.apache.cocoon.components.flow; import org.apache.avalon.excalibur.component.ExcaliburComponentSelector; import org.apache.avalon.framework.configuration.Configurable; import org.apache.avalon.framework.configuration.Configuration; import org.apache.avalon.framework.configuration.ConfigurationException; public class InterpreterSelector extends ExcaliburComponentSelector implements Configurable { ClassLoader loader = Thread.currentThread().getContextClassLoader(); public void configure(Configuration config) throws ConfigurationException { System.out.println("InterpreterSelector = " + this); Configuration[] components = config.getChildren("component-instance"); for (int i = 0; i < components.length; i++) { Configuration component = components[i]; String name = component.getAttribute("name"); String className = component.getAttribute("class"); System.out.println("Adding component with name " + name + ", class = " + className); Class clazz; try { clazz = loader.loadClass(className); addComponent(name, clazz, component); } catch (Exception ex) { throw new ConfigurationException("Cannot load class " + className); } } } } ---------------------------------------------------------------------- In case of troubles, e-mail: webmaster@xml.apache.org To unsubscribe, e-mail: cocoon-cvs-unsubscribe@xml.apache.org For additional commands, e-mail: cocoon-cvs-help@xml.apache.org