public synchronized @NotNull Element internElement(final @NotNull Element element) {
    if (element instanceof ImmutableElement) {
      return element;
    }

    for (Content content : element.getContent()) {
      if (content instanceof Element) {
        return new ImmutableElement(element, this);
      }
    }

    Element interned = myElements.get(element);
    if (interned == null) {
      interned = new ImmutableElement(element, this);
      myElements.add(interned);
    }
    return interned;
  }
public synchronized @NotNull Element internElement(final @NotNull Element element)