private static String getValue(String value)
    {
        if (value == null)
        {
            return null;
        }

        int start;
        int end;
        int index;

        if ((start = value.indexOf("${")) != -1)
        {
            String tag = value.substring(start + 1);

            if ((end = tag.indexOf("}")) != -1)
            {
                String toResolv = getValue(tag.substring(0, end));
                String at;

                return value.substring(0, start)
                        + ((((index = toResolv.indexOf("[")) == -1) || !toResolv
                                .endsWith("]")) ? (System.getProperties()
                                .containsKey(toResolv.substring(1)) ? System
                                .getProperty(toResolv.substring(1))
                                : ((toResolv.endsWith("()") && (toResolv
                                        .length() > 2)) ? callMethod(toResolv
                                        .substring(1, toResolv.length() - 2))
                                        : ("${" + toResolv.substring(1) + "}")))
                                : (((at = getAsString(toResolv.substring(1,
                                        index), toResolv.substring(index + 1,
                                        toResolv.length() - 1))) != null) ? at
                                        : "${" + toResolv.substring(1) + "}"))
                        + getValue(tag.substring(end + 1));
            }
        }

        return value;
    }