Configurer.configureElement + Configurer.configureAttribute git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271829 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -41,7 +41,7 @@ public class Facility | |||
| { | |||
| final String name = attributes[ i ]; | |||
| final String value = configuration.getAttribute( name ); | |||
| configure( this, name, value ); | |||
| configureAttribute( this, name, value ); | |||
| } | |||
| final Configuration[] children = configuration.getChildren(); | |||
| @@ -60,7 +60,7 @@ public class Facility | |||
| throw new ConfigurationException( message, e ); | |||
| } | |||
| configure( m_aspectHandler, children[ 0 ] ); | |||
| configureElement( m_aspectHandler, children[ 0 ] ); | |||
| } | |||
| else | |||
| { | |||
| @@ -64,7 +64,7 @@ public class ClassicConfigurer | |||
| * @param context the Context | |||
| * @exception ConfigurationException if an error occurs | |||
| */ | |||
| public void configure( final Object object, | |||
| public void configureElement( final Object object, | |||
| final Configuration configuration, | |||
| final TaskContext context ) | |||
| throws ConfigurationException | |||
| @@ -154,7 +154,7 @@ public class ClassicConfigurer | |||
| * @param context the Context | |||
| * @exception ConfigurationException if an error occurs | |||
| */ | |||
| public void configure( final Object object, | |||
| public void configureAttribute( final Object object, | |||
| final String name, | |||
| final String value, | |||
| final TaskContext context ) | |||
| @@ -474,7 +474,7 @@ public class ClassicConfigurer | |||
| try | |||
| { | |||
| final Object created = method.invoke( object, new Object[ 0 ] ); | |||
| configure( created, configuration, context ); | |||
| configureElement( created, configuration, context ); | |||
| } | |||
| catch( final ConfigurationException ce ) | |||
| { | |||
| @@ -498,7 +498,7 @@ public class ClassicConfigurer | |||
| final Class clazz = method.getParameterTypes()[ 0 ]; | |||
| final Object created = clazz.newInstance(); | |||
| configure( created, configuration, context ); | |||
| configureElement( created, configuration, context ); | |||
| method.invoke( object, new Object[]{created} ); | |||
| } | |||
| catch( final ConfigurationException ce ) | |||
| @@ -77,7 +77,7 @@ public class DefaultConfigurer | |||
| * @param context the Context | |||
| * @exception ConfigurationException if an error occurs | |||
| */ | |||
| public void configure( final Object object, | |||
| public void configureElement( final Object object, | |||
| final Configuration configuration, | |||
| final TaskContext context ) | |||
| throws ConfigurationException | |||
| @@ -217,7 +217,7 @@ public class DefaultConfigurer | |||
| * @param context the Context | |||
| * @exception ConfigurationException if an error occurs | |||
| */ | |||
| public void configure( final Object object, | |||
| public void configureAttribute( final Object object, | |||
| final String name, | |||
| final String value, | |||
| final TaskContext context ) | |||
| @@ -115,7 +115,7 @@ public class DefaultExecutor | |||
| final TaskContext taskContext ) | |||
| throws ConfigurationException | |||
| { | |||
| m_configurer.configure( task, taskModel, taskContext ); | |||
| m_configurer.configureElement( task, taskModel, taskContext ); | |||
| } | |||
| /** | |||
| @@ -89,10 +89,10 @@ public abstract class AbstractContainerTask | |||
| * @param element the configuration element | |||
| * @exception ConfigurationException if an error occurs | |||
| */ | |||
| protected final void configure( final Object object, final Configuration element ) | |||
| protected final void configureElement( final Object object, final Configuration element ) | |||
| throws ConfigurationException | |||
| { | |||
| m_configurer.configure( object, element, getContext() ); | |||
| m_configurer.configureElement( object, element, getContext() ); | |||
| } | |||
| /** | |||
| @@ -103,10 +103,10 @@ public abstract class AbstractContainerTask | |||
| * @param value the attibute value | |||
| * @exception ConfigurationException if an error occurs | |||
| */ | |||
| protected final void configure( final Object object, final String name, final String value ) | |||
| protected final void configureAttribute( final Object object, final String name, final String value ) | |||
| throws ConfigurationException | |||
| { | |||
| m_configurer.configure( object, name, value, getContext() ); | |||
| m_configurer.configureAttribute( object, name, value, getContext() ); | |||
| } | |||
| /** | |||
| @@ -45,7 +45,7 @@ public class TypeInstanceTask | |||
| if( name.equals( "id" ) || name.equals( "local-scope" ) ) | |||
| { | |||
| configure( this, name, value ); | |||
| configureAttribute( this, name, value ); | |||
| } | |||
| else | |||
| { | |||
| @@ -69,7 +69,7 @@ public class TypeInstanceTask | |||
| throw new ConfigurationException( message, e ); | |||
| } | |||
| configure( m_value, newConfiguration ); | |||
| configureElement( m_value, newConfiguration ); | |||
| } | |||
| public void setId( final String id ) | |||
| @@ -32,7 +32,7 @@ public interface Configurer | |||
| * @param context the Context | |||
| * @exception ConfigurationException if an error occurs | |||
| */ | |||
| void configure( Object object, Configuration configuration, TaskContext context ) | |||
| void configureElement( Object object, Configuration configuration, TaskContext context ) | |||
| throws ConfigurationException; | |||
| /** | |||
| @@ -46,6 +46,6 @@ public interface Configurer | |||
| * @param context the Context | |||
| * @exception ConfigurationException if an error occurs | |||
| */ | |||
| void configure( Object object, String name, String value, TaskContext context ) | |||
| void configureAttribute( Object object, String name, String value, TaskContext context ) | |||
| throws ConfigurationException; | |||
| } | |||
| @@ -146,7 +146,7 @@ public class DefaultConfigurerTest | |||
| // Configure the object | |||
| try | |||
| { | |||
| m_configurer.configure( test, config, m_context ); | |||
| m_configurer.configureElement( test, config, m_context ); | |||
| fail(); | |||
| } | |||
| catch( final ConfigurationException ce ) | |||
| @@ -205,7 +205,7 @@ public class DefaultConfigurerTest | |||
| // Configure the object | |||
| try | |||
| { | |||
| m_configurer.configure( test, config, m_context ); | |||
| m_configurer.configureElement( test, config, m_context ); | |||
| fail(); | |||
| } | |||
| catch( final ConfigurationException ce ) | |||
| @@ -252,7 +252,7 @@ public class DefaultConfigurerTest | |||
| // Configure the object | |||
| try | |||
| { | |||
| m_configurer.configure( test, config, m_context ); | |||
| m_configurer.configureElement( test, config, m_context ); | |||
| fail(); | |||
| } | |||
| catch( final ConfigurationException ce ) | |||
| @@ -323,7 +323,7 @@ public class DefaultConfigurerTest | |||
| m_context.setProperty( "prop-a", "some value" ); | |||
| // Configure the object | |||
| m_configurer.configure( test, config, m_context ); | |||
| m_configurer.configureElement( test, config, m_context ); | |||
| // Check the configured object | |||
| final ConfigTestReferenceElement expected = new ConfigTestReferenceElement(); | |||
| @@ -349,7 +349,7 @@ public class DefaultConfigurerTest | |||
| try | |||
| { | |||
| // Configure the object | |||
| m_configurer.configure( test, config, m_context ); | |||
| m_configurer.configureElement( test, config, m_context ); | |||
| fail(); | |||
| } | |||
| catch( ConfigurationException e ) | |||
| @@ -429,7 +429,7 @@ public class DefaultConfigurerTest | |||
| try | |||
| { | |||
| // Configure the object | |||
| m_configurer.configure( test, config, m_context ); | |||
| m_configurer.configureElement( test, config, m_context ); | |||
| fail(); | |||
| } | |||
| catch( final ConfigurationException ce ) | |||
| @@ -458,7 +458,7 @@ public class DefaultConfigurerTest | |||
| try | |||
| { | |||
| // Configure the object | |||
| m_configurer.configure( test, config, m_context ); | |||
| m_configurer.configureElement( test, config, m_context ); | |||
| fail(); | |||
| } | |||
| catch( final ConfigurationException ce ) | |||
| @@ -616,7 +616,7 @@ public class DefaultConfigurerTest | |||
| final ConfigTestConfigurable test = new ConfigTestConfigurable(); | |||
| // Configure the object | |||
| m_configurer.configure( test, config, m_context ); | |||
| m_configurer.configureElement( test, config, m_context ); | |||
| final ConfigTestConfigurable expected = new ConfigTestConfigurable(); | |||
| expected.configure( config ); | |||
| @@ -662,7 +662,7 @@ public class DefaultConfigurerTest | |||
| // Configure the object | |||
| try | |||
| { | |||
| m_configurer.configure( test, config, m_context ); | |||
| m_configurer.configureElement( test, config, m_context ); | |||
| fail(); | |||
| } | |||
| catch( ConfigurationException e ) | |||
| @@ -693,7 +693,7 @@ public class DefaultConfigurerTest | |||
| // Configure the object | |||
| try | |||
| { | |||
| m_configurer.configure( test, config, m_context ); | |||
| m_configurer.configureElement( test, config, m_context ); | |||
| fail(); | |||
| } | |||
| catch( ConfigurationException e ) | |||
| @@ -753,7 +753,7 @@ public class DefaultConfigurerTest | |||
| try | |||
| { | |||
| // Configure the object | |||
| m_configurer.configure( test, config, m_context ); | |||
| m_configurer.configureElement( test, config, m_context ); | |||
| fail(); | |||
| } | |||
| catch( ConfigurationException e ) | |||
| @@ -797,7 +797,7 @@ public class DefaultConfigurerTest | |||
| { | |||
| try | |||
| { | |||
| m_configurer.configure( test, config, m_context ); | |||
| m_configurer.configureElement( test, config, m_context ); | |||
| } | |||
| catch( final ConfigurationException ce ) | |||
| { | |||
| @@ -146,7 +146,7 @@ public class DefaultConfigurerTest | |||
| // Configure the object | |||
| try | |||
| { | |||
| m_configurer.configure( test, config, m_context ); | |||
| m_configurer.configureElement( test, config, m_context ); | |||
| fail(); | |||
| } | |||
| catch( final ConfigurationException ce ) | |||
| @@ -205,7 +205,7 @@ public class DefaultConfigurerTest | |||
| // Configure the object | |||
| try | |||
| { | |||
| m_configurer.configure( test, config, m_context ); | |||
| m_configurer.configureElement( test, config, m_context ); | |||
| fail(); | |||
| } | |||
| catch( final ConfigurationException ce ) | |||
| @@ -252,7 +252,7 @@ public class DefaultConfigurerTest | |||
| // Configure the object | |||
| try | |||
| { | |||
| m_configurer.configure( test, config, m_context ); | |||
| m_configurer.configureElement( test, config, m_context ); | |||
| fail(); | |||
| } | |||
| catch( final ConfigurationException ce ) | |||
| @@ -323,7 +323,7 @@ public class DefaultConfigurerTest | |||
| m_context.setProperty( "prop-a", "some value" ); | |||
| // Configure the object | |||
| m_configurer.configure( test, config, m_context ); | |||
| m_configurer.configureElement( test, config, m_context ); | |||
| // Check the configured object | |||
| final ConfigTestReferenceElement expected = new ConfigTestReferenceElement(); | |||
| @@ -349,7 +349,7 @@ public class DefaultConfigurerTest | |||
| try | |||
| { | |||
| // Configure the object | |||
| m_configurer.configure( test, config, m_context ); | |||
| m_configurer.configureElement( test, config, m_context ); | |||
| fail(); | |||
| } | |||
| catch( ConfigurationException e ) | |||
| @@ -429,7 +429,7 @@ public class DefaultConfigurerTest | |||
| try | |||
| { | |||
| // Configure the object | |||
| m_configurer.configure( test, config, m_context ); | |||
| m_configurer.configureElement( test, config, m_context ); | |||
| fail(); | |||
| } | |||
| catch( final ConfigurationException ce ) | |||
| @@ -458,7 +458,7 @@ public class DefaultConfigurerTest | |||
| try | |||
| { | |||
| // Configure the object | |||
| m_configurer.configure( test, config, m_context ); | |||
| m_configurer.configureElement( test, config, m_context ); | |||
| fail(); | |||
| } | |||
| catch( final ConfigurationException ce ) | |||
| @@ -616,7 +616,7 @@ public class DefaultConfigurerTest | |||
| final ConfigTestConfigurable test = new ConfigTestConfigurable(); | |||
| // Configure the object | |||
| m_configurer.configure( test, config, m_context ); | |||
| m_configurer.configureElement( test, config, m_context ); | |||
| final ConfigTestConfigurable expected = new ConfigTestConfigurable(); | |||
| expected.configure( config ); | |||
| @@ -662,7 +662,7 @@ public class DefaultConfigurerTest | |||
| // Configure the object | |||
| try | |||
| { | |||
| m_configurer.configure( test, config, m_context ); | |||
| m_configurer.configureElement( test, config, m_context ); | |||
| fail(); | |||
| } | |||
| catch( ConfigurationException e ) | |||
| @@ -693,7 +693,7 @@ public class DefaultConfigurerTest | |||
| // Configure the object | |||
| try | |||
| { | |||
| m_configurer.configure( test, config, m_context ); | |||
| m_configurer.configureElement( test, config, m_context ); | |||
| fail(); | |||
| } | |||
| catch( ConfigurationException e ) | |||
| @@ -753,7 +753,7 @@ public class DefaultConfigurerTest | |||
| try | |||
| { | |||
| // Configure the object | |||
| m_configurer.configure( test, config, m_context ); | |||
| m_configurer.configureElement( test, config, m_context ); | |||
| fail(); | |||
| } | |||
| catch( ConfigurationException e ) | |||
| @@ -797,7 +797,7 @@ public class DefaultConfigurerTest | |||
| { | |||
| try | |||
| { | |||
| m_configurer.configure( test, config, m_context ); | |||
| m_configurer.configureElement( test, config, m_context ); | |||
| } | |||
| catch( final ConfigurationException ce ) | |||
| { | |||