// Path: src/main/java/com/presidentio/testdatagenerator/cons/StringPlaceholderConst.java
// public class StringPlaceholderConst {
// 
//     public static final String TMP = "tmp";
// 
// }


import com.presidentio.testdatagenerator.cons.StringPlaceholderConst;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.map.DeserializationContext;
import org.codehaus.jackson.map.JsonDeserializer;
import java.io.IOException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
package com.presidentio.testdatagenerator.parser;



public class StringDeserializer extends JsonDeserializer<String> {

    private static final Pattern REGEX = Pattern.compile("\\$\\{(\\w+)}");

    @Override
    public String deserialize(JsonParser jsonParser, DeserializationContext deserializationContext)
            throws IOException {
        String str = jsonParser.getText();
        return formatString(str);
    }

    public String formatString(String s) {
        Matcher matcher = REGEX.matcher(s);
        StringBuilder result = new StringBuilder();
        int curIndex = 0;
        while (matcher.find()) {
            String group = matcher.group(1);
            result.append(s.substring(curIndex, matcher.start()));
            result.append(evaluate(group));
            curIndex = matcher.end();
        }
        result.append(s.substring(curIndex, s.length()));
        return result.toString();
    }

    private String evaluate(String s) {
        switch (s) {
// Path: src/main/java/com/presidentio/testdatagenerator/cons/StringPlaceholderConst.java
// public class StringPlaceholderConst {
// 
//     public static final String TMP = "tmp";
// 
// }


// Path: src/main/java/com/presidentio/testdatagenerator/parser/StringDeserializer.java
import com.presidentio.testdatagenerator.cons.StringPlaceholderConst;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.map.DeserializationContext;
import org.codehaus.jackson.map.JsonDeserializer;
import java.io.IOException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

package com.presidentio.testdatagenerator.parser;



public class StringDeserializer extends JsonDeserializer<String> {

    private static final Pattern REGEX = Pattern.compile("\\$\\{(\\w+)}");

    @Override
    public String deserialize(JsonParser jsonParser, DeserializationContext deserializationContext)
            throws IOException {
        String str = jsonParser.getText();
        return formatString(str);
    }

    public String formatString(String s) {
        Matcher matcher = REGEX.matcher(s);
        StringBuilder result = new StringBuilder();
        int curIndex = 0;
        while (matcher.find()) {
            String group = matcher.group(1);
            result.append(s.substring(curIndex, matcher.start()));
            result.append(evaluate(group));
            curIndex = matcher.end();
        }
        result.append(s.substring(curIndex, s.length()));
        return result.toString();
    }

    private String evaluate(String s) {
        switch (s) {
            case StringPlaceholderConst.TMP: