@Test public void testEmbedFlags() throws Exception { assertEquals("(?im:abc)", util.embedFlags("abc", Pattern.CASE_INSENSITIVE ^ Pattern.MULTILINE)); assertEquals("abc", util.embedFlags("abc", 0)); }
public String embedFlags(String regex, int flags) { if (flags == 0) { return regex; } else { return "(?" + mapFlagsToEmbeddedFlags(flags) + ":" + regex + ")"; } }
EmbeddedFlagUtil { public String embedFlags(String regex, int flags) { if (flags == 0) { return regex; } else { return "(?" + mapFlagsToEmbeddedFlags(flags) + ":" + regex + ")"; } } }
EmbeddedFlagUtil { public String embedFlags(String regex, int flags) { if (flags == 0) { return regex; } else { return "(?" + mapFlagsToEmbeddedFlags(flags) + ":" + regex + ")"; } }  }
EmbeddedFlagUtil { public String embedFlags(String regex, int flags) { if (flags == 0) { return regex; } else { return "(?" + mapFlagsToEmbeddedFlags(flags) + ":" + regex + ")"; } }  String embedFlags(String regex, int flags); }
EmbeddedFlagUtil { public String embedFlags(String regex, int flags) { if (flags == 0) { return regex; } else { return "(?" + mapFlagsToEmbeddedFlags(flags) + ":" + regex + ")"; } }  String embedFlags(String regex, int flags);  }