Author: jhm Date: Mon Oct 29 09:21:09 2007 New Revision: 589719 URL: http://svn.apache.org/viewvc?rev=589719&view=rev Log: sync
Modified: ant/core/tags/ANT_170/src/main/org/apache/tools/ant/TaskAdapter.java Modified: ant/core/tags/ANT_170/src/main/org/apache/tools/ant/TaskAdapter.java URL: http://svn.apache.org/viewvc/ant/core/tags/ANT_170/src/main/org/apache/tools/ant/TaskAdapter.java?rev=589719&r1=589718&r2=589719&view=diff ============================================================================== --- ant/core/tags/ANT_170/src/main/org/apache/tools/ant/TaskAdapter.java (original) +++ ant/core/tags/ANT_170/src/main/org/apache/tools/ant/TaskAdapter.java Mon Oct 29 09:21:09 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]