/** * Returns null if the source file name doesn't match the * "from" pattern, an one-element array containing the * translated file otherwise. * @param sourceFileName the source file name * @return a one-element array containing the translated file or * null if the to pattern did not match */ @Override public String[] mapFileName(String sourceFileName) { if (sourceFileName == null) { return null; } if (handleDirSep) { if (sourceFileName.contains("\\")) { sourceFileName = sourceFileName.replace('\\', '/'); } } if (reg == null || to == null || !reg.matches(sourceFileName, regexpOptions)) { return null; } return new String[] {replaceReferences(sourceFileName)}; }
matcher.setPattern(r.regex); for (String name : props.keySet()) { if (matcher.matches(name)) { names.add(name);