code: public LinkedList<UriTemplateComponent> scan(String templateString) throws MalformedUriTemplateException
      {
          char[] template = templateString.toCharArray();
          startTemplate();
          int i;
          for (i = 0; i < template.length; i++)
          {
              char c = template[i];
  
              if (c == EXPR_START)
              {
                  if (literalCaptureOn)
                  {
                      endLiteral(i);
                  }
                  startExpression(i);
              }
  
              if (c != EXPR_START)
              {
                  startLiteral(i);
              }
  
  
              if (expressionCaptureOn || literalCaptureOn)
              {
                  capture(c);
              }
  
              if (c == EXPR_END)
              {
                  endExpression(i);
                  startLiteral(i);
              }
          }
          if (literalCaptureOn)
          {
              endLiteral(i);
          }
          endTemplate(i);
          return components;
      }
docs: Scans the URI template looking for literal string components and expressions.
  
  @param templateString the URI template string to scan
  @since 2.0