Browse Source

Two constructors: for easier use and (then needed) for reflection.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@589715 13f79535-47bb-0310-9956-ffa450edef68
master
Jan Materne 18 years ago
parent
commit
0aea51ece7
1 changed files with 20 additions and 0 deletions
  1. +20
    -0
      src/main/org/apache/tools/ant/TaskAdapter.java

+ 20
- 0
src/main/org/apache/tools/ant/TaskAdapter.java View File

@@ -33,6 +33,26 @@ public class TaskAdapter extends Task implements TypeAdapter {
/** Object to act as a proxy for. */
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


Loading…
Cancel
Save