Browse Source

Move the logic to bind a created task to an existing one into Task.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277697 13f79535-47bb-0310-9956-ffa450edef68
master
Steve Loughran 20 years ago
parent
commit
83e3951f2b
1 changed files with 14 additions and 0 deletions
  1. +14
    -0
      src/main/org/apache/tools/ant/Task.java

+ 14
- 0
src/main/org/apache/tools/ant/Task.java View File

@@ -475,4 +475,18 @@ public abstract class Task extends ProjectComponent {
protected RuntimeConfigurable getWrapper() {
return wrapper;
}

/**
* Bind a task to another; use this when configuring a newly created
* task to do work on behalf of another.
* Project, OwningTarget, TaskName, Location and Description are all copied
* @param owner owning target
*/
public final void bindToOwner(Task owner) {
setProject(owner.getProject());
setOwningTarget(owner.getOwningTarget());
setTaskName(owner.getTaskName());
setDescription(owner.getDescription());
setLocation(owner.getLocation());
}
}

Loading…
Cancel
Save