ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Murdoch" <adammurdoch...@yahoo.com>
Subject RE: cvs commit: jakarta-ant/proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer ConfigTest10.java StringToMyRole1Converter.java DefaultConfigurerTest.java MyRole1.java
Date Fri, 08 Feb 2002 22:33:40 GMT


> -----Original Message-----
> From: adammurdoch@apache.org [mailto:adammurdoch@apache.org]
> Sent: Saturday, 9 February 2002 8:20 AM
> To: jakarta-ant-cvs@apache.org
> Subject: cvs commit:
> jakarta-ant/proposal/myrmidon/src/testcases/org/apache/myrmidon/componen
> ts/configurer ConfigTest10.java StringToMyRole1Converter.java
> DefaultConfigurerTest.java MyRole1.java
>
>
> adammurdoch    02/02/08 14:20:00
>
>   Modified:
> proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer
>                         DefaultConfigurer.java
> DefaultObjectConfigurer.java
>                         ObjectConfigurer.java Resources.properties
>
> proposal/myrmidon/src/testcases/org/apache/myrmidon/components
>                         AbstractComponentTest.java
>
> proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer
>                         DefaultConfigurerTest.java MyRole1.java
>   Added:
> proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer
>                         ConfigTest10.java StringToMyRole1Converter.java
>   Log:
>   Changes to DefaultConfigurer:
>
>   * Uses the DataType role when creating instances for interface
> properties,
>     rather than using the interface itself as the role.
>

The motivation for this change was to allow a data type to be used in
<property>, TypeInstanceTask, and as a parameter to add() methods.

I tried a few other alternatives, like introducing a role hierarchy, or
registering the types in multiple roles.  They ended up being too complex,
so this seemed like the simplest solution (for the time being, at least).


>   * Added ObjectConfigurer.getTypedProperty().  This replaces the implicit
>     behaviour in DefaultObjectConfigurer.getProperty() where the typed
>     property was returned for an unknown property name.
>
>   * Typed properties are set using attributes and references, with the
>     property's interface role shorthand name.  Previously, the
> DefaultConfigurer
>     would attempt to set the typed property for any unknown attribute or
>     reference name.
>

This was to fix some weirdness that was happening for types with add()
methods, where the configurer would attempt to use the add() method for any
attributes or references whose name did not match one of the named
properties.  Now you have to use the role name, for attributes and
references.  No change to how nested elements are treated, except when
they're references.


Adam


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message