Methods Summary |
---|
public synchronized void | add(org.apache.tools.ant.types.ResourceCollection c)Add a ResourceCollection.
if (isReference()) {
throw noChildrenAllowed();
}
if (c == null) {
return;
}
if (rc == null) {
rc = new Vector();
}
rc.add(c);
FailFast.invalidate(this);
coll = null;
setChecked(false);
|
protected void | dieOnCircularReference(java.util.Stack stk, org.apache.tools.ant.Project p)Overrides the version of DataType to recurse on all DataType
child elements that may have been added.
if (isChecked()) {
return;
}
if (isReference()) {
super.dieOnCircularReference(stk, p);
} else {
for (Iterator i = getNested().iterator(); i.hasNext();) {
Object o = i.next();
if (o instanceof DataType) {
invokeCircularReferenceCheck((DataType) o, stk, p);
}
}
setChecked(true);
}
|
private synchronized java.util.List | getNested()
return rc == null ? Collections.EMPTY_LIST : rc;
|
private org.apache.tools.ant.types.ResourceCollection | getRef()Resolves references, allowing any ResourceCollection.
return (ResourceCollection) getCheckedRef(
ResourceCollection.class, "ResourceCollection");
|
public boolean | isFilesystemOnly()Fulfill the ResourceCollection contract.
if (isReference()) {
return getRef().isFilesystemOnly();
}
validate();
for (Iterator i = getNested().iterator(); i.hasNext();) {
if ((!((ResourceCollection) i.next()).isFilesystemOnly())) {
return false;
}
}
return true;
|
public synchronized java.util.Iterator | iterator()Fulfill the ResourceCollection contract.
if (isReference()) {
return getRef().iterator();
}
validate();
return new FailFast(this, coll.iterator());
|
public synchronized int | size()Fulfill the ResourceCollection contract.
if (isReference()) {
return getRef().size();
}
validate();
return coll.size();
|
public synchronized java.lang.String | toString()Format this BaseResourceCollectionContainer as a String.
if (isReference()) {
return getCheckedRef().toString();
}
if (coll == null || coll.isEmpty()) {
return "";
}
StringBuffer sb = new StringBuffer();
for (Iterator i = coll.iterator(); i.hasNext();) {
if (sb.length() > 0) {
sb.append(File.pathSeparatorChar);
}
sb.append(i.next());
}
return sb.toString();
|
private synchronized void | validate()
dieOnCircularReference();
coll = (coll == null) ? new MyCollection() : coll;
|