public @Nullable DomInvocationHandler getDomHandler(@Nullable XmlElement xml) {
    if (xml instanceof XmlTag) {
      return CachedValuesManager.getCachedValue(xml, chooseKey(HANDLER_KEY, HANDLER_KEY_FOR_INDEX), () ->
      {
        DomInvocationHandler handler = DomCreator.createTagHandler((XmlTag)xml);
        if (handler != null && handler.getXmlTag() != xml) {
          throw new AssertionError("Inconsistent dom, stub=" + handler.getStub());
        }
        return CachedValueProvider.Result.create(handler, PsiModificationTracker.MODIFICATION_COUNT, this);
      });
    }
    if (xml instanceof XmlAttribute) {
      return CachedValuesManager.getCachedValue(xml, chooseKey(HANDLER_KEY, HANDLER_KEY_FOR_INDEX), () ->
        CachedValueProvider.Result.create(DomCreator.createAttributeHandler((XmlAttribute)xml), PsiModificationTracker.MODIFICATION_COUNT, this));
    }
    return null;
  }
public @Nullable DomInvocationHandler getDomHandler(@Nullable XmlElement xml)