@Test public void escapeWithSlash() throws Exception { NamePatternEscaping escaping = new NamePatternEscaping("/"); assertNull(escaping.escape(null)); assertEquals("TABLE", escaping.escape("TABLE")); assertEquals("\\TABLE", escaping.escape("\\TABLE")); assertEquals(" assertEquals("TABLE/_NAME", escaping.escape("TABLE_NAME")); assertEquals("\\TABLE/_/%NAME", escaping.escape("\\TABLE_%NAME")); assertEquals(" }
public String escape(String name) { if (needsEscaping(name)) { return replacementPattern.matcher(name).replaceAll(replacement); } else { return name; } }
NamePatternEscaping { public String escape(String name) { if (needsEscaping(name)) { return replacementPattern.matcher(name).replaceAll(replacement); } else { return name; } } }
NamePatternEscaping { public String escape(String name) { if (needsEscaping(name)) { return replacementPattern.matcher(name).replaceAll(replacement); } else { return name; } } NamePatternEscaping(String escape); }
NamePatternEscaping { public String escape(String name) { if (needsEscaping(name)) { return replacementPattern.matcher(name).replaceAll(replacement); } else { return name; } } NamePatternEscaping(String escape); String escape(String name); }
NamePatternEscaping { public String escape(String name) { if (needsEscaping(name)) { return replacementPattern.matcher(name).replaceAll(replacement); } else { return name; } } NamePatternEscaping(String escape); String escape(String name);  }