@Test public void replace() throws Exception { final String key = "my-key"; final CPrimitive primitive = new CPrimitive("#{" + key + "}"); final String expectedValue = "C:\\temp\\"; primitive.replace(key, expectedValue); assertEquals(expectedValue, primitive.value()); }
@Override public void replace(String key, String resolvedValue) { value = value.replaceAll("#\\{" + key + "\\}", Matcher.quoteReplacement(resolvedValue)); }
CPrimitive extends CValue { @Override public void replace(String key, String resolvedValue) { value = value.replaceAll("#\\{" + key + "\\}", Matcher.quoteReplacement(resolvedValue)); } }
CPrimitive extends CValue { @Override public void replace(String key, String resolvedValue) { value = value.replaceAll("#\\{" + key + "\\}", Matcher.quoteReplacement(resolvedValue)); } CPrimitive(String value); }
CPrimitive extends CValue { @Override public void replace(String key, String resolvedValue) { value = value.replaceAll("#\\{" + key + "\\}", Matcher.quoteReplacement(resolvedValue)); } CPrimitive(String value); String value(); @Override Set<String> referencedKeys(); @Override void replace(String key, String resolvedValue); @Override String toString(); @Override boolean equals(final Object o); @Override int hashCode(); }
CPrimitive extends CValue { @Override public void replace(String key, String resolvedValue) { value = value.replaceAll("#\\{" + key + "\\}", Matcher.quoteReplacement(resolvedValue)); } CPrimitive(String value); String value(); @Override Set<String> referencedKeys(); @Override void replace(String key, String resolvedValue); @Override String toString(); @Override boolean equals(final Object o); @Override int hashCode();  }