Author: jhm Date: Mon Oct 29 09:19:14 2007 New Revision: 589715 URL: http://svn.apache.org/viewvc?rev=589715&view=rev Log: Two constructors: for easier use and (then needed) for reflection.
Modified: ant/core/trunk/src/main/org/apache/tools/ant/TaskAdapter.java Modified: ant/core/trunk/src/main/org/apache/tools/ant/TaskAdapter.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/TaskAdapter.java?rev=589715&r1=589714&r2=589715&view=diff ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/TaskAdapter.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/TaskAdapter.java Mon Oct 29 09:19:14 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]