use of org.apache.tools.ant.types.resources.Intersect in project ant by apache.
the class Concat method getResources.
/**
* Get the resources to concatenate.
*/
private ResourceCollection getResources() {
if (rc == null) {
return new StringResource(getProject(), textBuffer.toString());
}
if (dest != null) {
Intersect checkDestNotInSources = new Intersect();
checkDestNotInSources.setProject(getProject());
checkDestNotInSources.add(rc);
checkDestNotInSources.add(dest);
if (checkDestNotInSources.size() > 0) {
throw new BuildException("Destination resource %s was specified as an input resource.", dest);
}
}
Restrict noexistRc = new Restrict();
noexistRc.add(NOT_EXISTS);
noexistRc.add(rc);
for (Resource r : noexistRc) {
log(r + " does not exist.", Project.MSG_ERR);
}
Restrict result = new Restrict();
result.add(EXISTS);
result.add(rc);
return result;
}
Aggregations