Author: mbenson
Date: Thu Sep 21 12:24:25 2006
New Revision: 448641
URL: http://svn.apache.org/viewvc?view=rev&rev=448641
Log:
try to address Jon Skeet's concerns about documenting the diff. between
add/addConfigured in the Javadoc; removing his TODO
Modified:
ant/core/trunk/src/main/org/apache/tools/ant/IntrospectionHelper.java
Modified: ant/core/trunk/src/main/org/apache/tools/ant/IntrospectionHelper.java
URL:
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/IntrospectionHelper.java?view=diff&rev=448641&r1=448640&r2=448641
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/IntrospectionHelper.java
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/IntrospectionHelper.java Thu
Sep 21 12:24:25 2006
@@ -112,17 +112,6 @@
*/
private Class bean;
- // XXX: (Jon Skeet) The documentation below doesn't draw a clear
- // distinction between addConfigured and add. It's obvious what the
- // code *here* does (addConfigured sets both a creator method which
- // calls a no-arg constructor and a storer method which calls the
- // method we're looking at, while add just sets a creator method
- // which calls the method we're looking at) but it's not at all
- // obvious what the difference in actual *effect* will be later
- // on. I can't see any mention of addConfiguredXXX in "Developing
- // with Ant" (at least in the version on the web site). Someone
- // who understands should update this documentation
- // (and preferably the manual too) at some stage.
/**
* Sole constructor, which is private to ensure that all
* IntrospectionHelpers are created via [EMAIL PROTECTED]
#getHelper(Class) getHelper}.
@@ -151,12 +140,14 @@
* <code>Bar</code> is not an array, primitive or String type.
* <code>Bar</code> must have an accessible constructor taking no
* arguments.
- * <li><code>void addFoo(Bar)</code> is recognised as a
- * method for storing an element called <code>foobar</code>
- * and of type <code>Baz</code>, so long as
- * <code>Baz</code> is not an array, primitive or String type.
- * <code>Baz</code> must have an accessible constructor taking no
- * arguments.
+ * <li><code>void addFoo(Bar)</code> is recognised as a method for storing
+ * an element called <code>foo</code> and of type <code>Bar</code>, so
+ * long as <code>Bar</code> is not an array, primitive or String type.
+ * <code>Bar</code> must have an accessible constructor taking no
+ * arguments. This is distinct from the 'addConfigured' idiom in that
+ * the nested element is added to the parent immediately after it is
+ * constructed; in practice this means that <code>addFoo(Bar)</code> should
+ * do little or nothing with its argument besides storing it for later use.
* </ul>
* Note that only one method is retained to create/set/addConfigured/add
* any element or attribute.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]