private static void addCoreInvocations(final Class<?> aClass) {
    for (final Method method : ReflectionUtil.getClassDeclaredMethods(aClass)) {
      if ("equals".equals(method.getName())) {
        ourCoreInvocations.put(new JavaMethodSignature(method), (handler, args) -> {
          final DomElement proxy = handler.getProxy();
          final Object arg = args[0];
          if (proxy == arg) return true;
          if (arg == null) return false;

          if (arg instanceof DomElement) {
            final DomInvocationHandler handler1 = DomManagerImpl.getDomInvocationHandler(proxy);
            return handler1 != null && handler1.equals(DomManagerImpl.getDomInvocationHandler((DomElement)arg));
          }

          return false;
        });
      }
      else if ("hashCode".equals(method.getName())) {
        ourCoreInvocations.put(new JavaMethodSignature(method), (handler, args) -> handler.hashCode());
      }
      else {
        ourCoreInvocations.put(new JavaMethodSignature(method), (handler, args) -> method.invoke(handler, args));
      }
    }
  }
private static void addCoreInvocations(final Class<?> aClass)