Browse Source

add clear()

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@359225 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 19 years ago
parent
commit
536a373dea
1 changed files with 14 additions and 0 deletions
  1. +14
    -0
      src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionContainer.java

+ 14
- 0
src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionContainer.java View File

@@ -55,6 +55,20 @@ public abstract class BaseResourceCollectionContainer
return cache;
}

/**
* Clear the container.
* @throws BuildException on error.
*/
public synchronized void clear() throws BuildException {
if (isReference()) {
throw noChildrenAllowed();
}
rc.clear();
FailFast.invalidate(this);
coll = null;
setChecked(false);
}

/**
* Add a ResourceCollection to the container.
* @param c the ResourceCollection to add.


Loading…
Cancel
Save