* Added max multiplicity checking. Properties with a setter method can only
be set once, whereas properties with an adder method can be set an unlimited
number of times.
* Resolves properties in reference ids. e.g
<javac classpath-ref="${my-classpath-id-name}"/>
* Ignores String adder and setter methods, if other methods exist. Longer
term, the type should be able to specify exactly which method to use.
* Moved all per-object state behind the ConfigurationState interface. The
ObjectConfigurer is now responsible for state-based validation.
* Tidied-up error messages. More context info is available in error
messages, to make figuring out the problem easier. Error messages still
need work.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270822 13f79535-47bb-0310-9956-ffa450edef68
* Added a String -> Path converter.
* Added the appropriate declarations to ant1-ant-descriptor.xml.
* PathLocation is now only used internally by Path. This means a <path> may
not contain nested <pathlocation> elements any more. Nested <path> elements
can be used to do the same thing.
* Removed Path.systemClasspath and Path.concatSystemClassPath(). The goal
is to add specialised <systemclasspath>, <antruntime>, and <javaruntime>
data-types to control this explicitly. I left it unfinished, because the
as-yet-unwritten Java util stuff will determine how it should be done.
* Moved Path.addExtdirs() -> DefaultCompilerAdaptor. This was the only
place it was used.
* Cleaned out a few more Path createX() methods.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270786 13f79535-47bb-0310-9956-ffa450edef68
setX()/createX() and setX()/addX() method pairs into a single setX() or
addX() method. �I've started with Path, to get rid of some its inertia.
Submitted by: "Adam Murdoch" <adammurdoch_ml@yahoo.com>
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270776 13f79535-47bb-0310-9956-ffa450edef68
* Handle references.
References can appear as either an attribute or a nested element of an
object:
As an attribute:
<javac classpath-ref="some-classpath">
As a nested element:
<javac>
<classpath-ref id="some-classpath"/>
</javac>
* Unify attributes and elements at the task interface.
This patch changes the configurer so that the addX() and setX() methods have
the same semantics. Each addX() or setX() method defines a property X,
which can appear as either an attribute x or as nested <x> elements (or
both).
There may also be createX() method, which is used to create the property
value to be configured. A property with a createX() method may only appear
as a nested element.
A quick summary of how the configurer configures an object:
- For each attribute x-ref="id":
- looks up the object using "id".
- sets the value using setX()/addX().
- this cannot be used if the object has a createX() method.
- For each attribute x="value":
- resolves property references in the value.
- converts the string value into the correct type.
- sets the value using setX()/addX().
- this cannot be used if the object has a createX() method.
- For each nested element <x-ref id="id"/>:
- handled the same as attribute x-ref="id".
- For each nested element <x>:
- creates the value using the createX() method (if present) or the no-args
constructor.
- configures the value using the nested element.
- sets the value using setX()/addX().
This is really only intended to be a temporary solution. I'd like to go
through and standardise on either addX() or setX(), and possibly look at
doing away with the createX() method. And there's plenty more stuff yet to
be implemented.
Submitted By: "Adam Murdoch" <adammurdoch@yahoo.com>
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270761 13f79535-47bb-0310-9956-ffa450edef68