code: private static String buildTemplateNameForJavadoc(
        SoyFileNode currSoyFile, TemplateMetadata template) {
  
      StringBuilder resultSb = new StringBuilder();
  
      if (template.getSourceLocation().getFilePath().equals(currSoyFile.getFilePath())
          && template.getTemplateKind() != TemplateMetadata.Kind.DELTEMPLATE) {
        resultSb.append(
            template.getTemplateName().substring(template.getTemplateName().lastIndexOf('.')));
      } else {
        switch (template.getTemplateKind()) {
          case BASIC:
          case ELEMENT:
            resultSb.append(template.getTemplateName());
            break;
          case DELTEMPLATE:
            resultSb.append(template.getDelTemplateName());
            if (!template.getDelTemplateVariant().isEmpty()) {
              resultSb.append(':');
              resultSb.append(template.getDelTemplateVariant());
            }
            break;
        }
      }
  
      if (template.getVisibility() != Visibility.PUBLIC) {
        resultSb.append(" (private)");
      }
      if (template.getTemplateKind() == TemplateMetadata.Kind.DELTEMPLATE) {
        resultSb.append(" (delegate)");
      }
  
      return resultSb.toString();
    }
docs: Private helper to build the human-readable string for referring to a template in the generated
  code's javadoc.
  
  @param currSoyFile The current Soy file for which we're generating parse-info code.
  @param template The template that we want to refer to in the generated javadoc. Note that this
  template may not be in the current Soy file.
  @return The human-readable string for referring to the given template in the generated code's
  javadoc.