code: private void parse()
     {
        template = text;
        if (StringUtils.isEmptyTrimmed(template))
           return;
        int index = 0;
        while (template.indexOf("${") != -1)
        {
           int from = template.lastIndexOf("${");
           int to = template.indexOf("}", from + 2);
           if (to == -1)
           {
              template = text;
              complex = false;
              entities.clear();
              return;
           }
  
           int dv = template.indexOf(":", from + 2);
           if (dv != -1 && dv > to)
           {
              dv = -1;
           }
           String systemProperty = null;
           String defaultValue = null;
           String s = template.substring(from + 2, to);
           if ("/".equals(s))
           {
              systemProperty = File.separator;
           }
           else if (":".equals(s))
           {
              systemProperty = File.pathSeparator;
              dv = -1;
           }
           else
           {
              systemProperty = SecurityActions.getSystemProperty(s);
           }
  
           if (dv != -1)
           {
              s = template.substring(from + 2, dv);
              systemProperty = SecurityActions.getSystemProperty(s);
              defaultValue = template.substring(dv + 1, to);
           }
           String prefix = "";
           String postfix = "";
           String key = StringUtils.createKey(index++);
           updateComplex(defaultValue);
           entities.put(key, new Expression(s, defaultValue, systemProperty));
  
           if (from != 0)
           {
              prefix = template.substring(0, from);
           }
           if (to + 1 < template.length())
           {
              postfix = template.substring(to + 1);
           }
           template = prefix + key + postfix;
        }
        updateComplex(template);
     }
docs: Parse a text and get a template and expression entities