List<File> (@Nullable AntDomPattern pattern, Set<AntFilesProvider> processed) { assert pattern != null; final File singleFile = getCanonicalFile(getFile().getStringValue()); if (singleFile == null || pattern.hasIncludePatterns()) { // if singleFile is specified, there are no implicit includes final File root = getCanonicalFile(getDir().getStringValue()); if (root != null) { final ArrayList<File> files = new ArrayList<>(); if (singleFile != null) { files.add(singleFile); } new FilesCollector().collectFiles(files, root, "", pattern); return files; } } if (singleFile != null) { return Collections.singletonList(singleFile); } return Collections.emptyList(); }