code: public static Tag createInstance(int id, String tagName) throws TagCreateException {
          Class<? extends Tag> clazz = idToTag.get(id);
          if(clazz == null) {
              throw new TagCreateException("Could not find tag with ID \"" + id + "\".");
          }
  
          try {
              Constructor<? extends Tag> constructor = clazz.getDeclaredConstructor(String.class);
              constructor.setAccessible(true);
              return constructor.newInstance(tagName);
          } catch(Exception e) {
              throw new TagCreateException("Failed to create instance of tag \"" + clazz.getSimpleName() + "\".", e);
          }
      }
docs: Creates an instance of the tag with the given id, using the String constructor.
  
  @param id      Id of the tag.
  @param tagName Name to give the tag.
  @return The created tag.
  @throws TagCreateException If an error occurs while creating the tag.