BooleanReturningMethodInvoker bmi = new BooleanReturningMethodInvoker("isCase");
for (final File currentFile : files) {
if (fileType == FileType.ANY ||
(fileType != FileType.FILES && currentFile.isDirectory()) ||
(fileType != FileType.DIRECTORIES && currentFile.isFile())) {
if (bmi.invoke(nameFilter, currentFile.getName()))
closure.call(currentFile);
}
}
}