In Python, when formatting string, I can fill placeholders by name rather than by position, like that:
print \"There\'s an incorrect value \'%(value)s\' in c
You can use StringTemplate library, it offers what you want and much more.
import org.antlr.stringtemplate.*; final StringTemplate hello = new StringTemplate("Hello, $name$"); hello.setAttribute("name", "World"); System.out.println(hello.toString());