code: private static boolean validTemplateTypeName(String name) {
      return !name.isEmpty()
          && CharMatcher.javaLetterOrDigit().or(CharMatcher.is('_')).matchesAllOf(name);
    }
docs: The types in @template annotations must contain only letters, digits, and underscores.