code: static Text asEngineText(final IText text) {
          if (text instanceof Text) {
              return (Text) text;
          }
          return new Text(text.getText(), text.getTemplateName(), text.getLine(), text.getCol());
      }
docs: Meant to be called only from within the engine