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