Author: mbenson
Date: Mon Oct 29 09:36:10 2007
New Revision: 589728

URL: http://svn.apache.org/viewvc?rev=589728&view=rev
Log:
merge Jan's new constructor in the branch

Modified:
    
ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/TaskAdapter.java

Modified: 
ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/TaskAdapter.java
URL: 
http://svn.apache.org/viewvc/ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/TaskAdapter.java?rev=589728&r1=589727&r2=589728&view=diff
==============================================================================
--- 
ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/TaskAdapter.java 
(original)
+++ 
ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/TaskAdapter.java 
Mon Oct 29 09:36:10 2007
@@ -34,6 +34,26 @@
     private Object proxy;
 
     /**
+     * No-arg constructor for reflection.
+     */
+    public TaskAdapter() {
+    }
+
+    /**
+     * Constructor for given proxy.
+     * So you could write easier code
+     * <pre>
+     * myTaskContainer.addTask( new TaskAdapter(myProxy) );
+     * </pre>
+     *
+     * @param proxy The object which Ant should use as task.
+     */
+    public TaskAdapter(Object proxy) {
+        this();
+        setProxy(proxy);
+    }
+
+    /**
      * Checks whether or not a class is suitable to be adapted by TaskAdapter.
      * If the class is of type Dispatchable, the check is not performed because
      * the method that will be executed will be determined only at runtime of



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to