From cc482fe8a9f68aa9a3becaeeea16d9b804e18c50 Mon Sep 17 00:00:00 2001 From: Peter Donald Date: Wed, 13 Mar 2002 09:35:55 +0000 Subject: [PATCH] Expose the new Configuration methods in AbstractContainer task git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271838 13f79535-47bb-0310-9956-ffa450edef68 --- .../framework/AbstractContainerTask.java | 36 ++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/framework/AbstractContainerTask.java b/proposal/myrmidon/src/java/org/apache/myrmidon/framework/AbstractContainerTask.java index 52e056f12..19df5c711 100644 --- a/proposal/myrmidon/src/java/org/apache/myrmidon/framework/AbstractContainerTask.java +++ b/proposal/myrmidon/src/java/org/apache/myrmidon/framework/AbstractContainerTask.java @@ -89,12 +89,29 @@ public abstract class AbstractContainerTask * @param element the configuration element * @exception ConfigurationException if an error occurs */ - protected final void configureElement( final Object object, final Configuration element ) + protected final void configureElement( final Object object, + final Configuration element ) throws ConfigurationException { m_configurer.configureElement( object, element, getContext() ); } + /** + * Configure an object using specific configuration element. + * + * @param object the object + * @param clazz the class to use when configuring element + * @param element the configuration element + * @exception ConfigurationException if an error occurs + */ + protected final void configureElement( final Object object, + final Class clazz, + final Configuration element ) + throws ConfigurationException + { + m_configurer.configureElement( object, clazz, element, getContext() ); + } + /** * Configure an objects attribute using parameters. * @@ -109,6 +126,23 @@ public abstract class AbstractContainerTask m_configurer.configureAttribute( object, name, value, getContext() ); } + /** + * Configure an objects attribute using parameters. + * + * @param object the object + * @param clazz the class to use when configuring element + * @param name the attibute name + * @param value the attibute value + * @exception ConfigurationException if an error occurs + */ + protected final void configureAttribute( final Object object, + final Class clazz, + final String name, final String value ) + throws ConfigurationException + { + m_configurer.configureAttribute( object, clazz, name, value, getContext() ); + } + /** * Utility method to execute specified tasks in current ExecutionFrame. */