@Nullable
 public static DomInvocationHandler getDomInvocationHandler(DomElement proxy) {
   if (proxy instanceof DomFileElement) {
     return null;
   }
   if (proxy instanceof DomInvocationHandler) {
     return (DomInvocationHandler) proxy;
   }
   final InvocationHandler handler = AdvancedProxy.getInvocationHandler(proxy);
   if (handler instanceof StableInvocationHandler) {
     final DomElement element =
         ((StableInvocationHandler<DomElement>) handler).getWrappedElement();
     return element == null ? null : getDomInvocationHandler(element);
   }
   if (handler instanceof DomInvocationHandler) {
     return (DomInvocationHandler) handler;
   }
   return null;
 }
 public static StableInvocationHandler getStableInvocationHandler(Object proxy) {
   return (StableInvocationHandler) AdvancedProxy.getInvocationHandler(proxy);
 }