void (final String antPattern) { myIncludePatterns.add(convertToRegexPattern(antPattern, myCaseSensitive)); String normalizedPattern = antPattern.endsWith("/") || antPattern.endsWith(File.separator)? antPattern.replace(File.separatorChar, '/') + "**" : antPattern.replace(File.separatorChar, '/'); if (normalizedPattern.startsWith("/") && normalizedPattern.length() > 1) { // cut first leading slash if any normalizedPattern = normalizedPattern.substring(1); } if (!normalizedPattern.startsWith("/")) { final String[] patDirs = normalizedPattern.split(ourSeparatorPattern); final PrefixItem[] items = new PrefixItem[patDirs.length]; for (int i = 0; i < patDirs.length; i++) { items[i] = new PrefixItem(patDirs[i]); } myCouldBeIncludedPatterns.add(items); } }