*/
private ResourceCollection getResources() {
if (rc == null) {
return new StringResource(getProject(), textBuffer.toString());
}
Restrict noexistRc = new Restrict();
noexistRc.add(NOT_EXISTS);
noexistRc.add(rc);
for (Iterator i = noexistRc.iterator(); i.hasNext();) {
log(i.next() + " does not exist.", Project.MSG_ERR);
}
if (destinationFile != null) {
for (Iterator i = rc.iterator(); i.hasNext();) {
Object o = i.next();
if (o instanceof FileResource) {
File f = ((FileResource) o).getFile();
if (FILE_UTILS.fileNameEquals(f, destinationFile)) {
throw new BuildException("Input file \""
+ f + "\" is the same as the output file.");
}
}
}
}
Restrict result = new Restrict();
result.add(EXISTS);
result.add(rc);
return result;
}