docs: public Object getNearObject(Object farObject) {
          Object nearObject = null;
          if (farObject instanceof BridgeFacet) {
              BridgeFacet facet = (BridgeFacet) farObject;
              if (facet.hasBridgeFacets()) {
                  BridgeFacets facets = facet.getBridgeFacets();
                  if (facets.hasNearObject()) {
                      nearObject = nearType.cast(facets.getNearObject());
                  }
              }
          }
          if (nearObject == null) {
              if (!farType.isInstance(farObject)) {
                  RuntimeException exception = new ClassCastException("Class: " + display(farType) + ": object: " + display(farObject));
                  if (logger.isTraceEnabled()) {
                      logger.trace("Far type: " + display(farType), exception);
                  }
                  throw exception;
              }
              Class<?>[] interfaces = new Class[] { BridgeFacet.class };
              final BridgeFacets facets;
              if (farObject instanceof BaseBridgeFacet && ((BaseBridgeFacet) farObject).hasBridgeFacets()) {
                  facets = ((BaseBridgeFacet) farObject).getBridgeFacets();
              } else {
                  Map<Integer,Object> helperInstances = new HashMap<>();
                  for (int i = 0; i < helpers.length; i++) {
                      Object helper = helpers[i];
                      if (helper instanceof Class) {
                          Class<?> helperType = (Class<?>) helper;
                          try {
                              Object helperInstance = helperType.newInstance();
                              helperInstances.put(i, helperInstance);
                          } catch (Throwable throwable) {
                              throw ExceptionWrapper.wrap(throwable);
                          }
                      }
                  }
                  facets = new BridgeFacets(farType.cast(farObject), this, helperInstances);
                  for (Object helperInstance : helperInstances.values()) {
                      if (helperInstance instanceof BaseBridgeFacet) {
                          ((BaseBridgeFacet) helperInstance).setBridgeFacets(facets);
                      }
                  }
              }
              if (farObject instanceof BaseBridgeFacet && !((BaseBridgeFacet) farObject).hasBridgeFacets()) {
                  ((BaseBridgeFacet) farObject).setBridgeFacets(facets);
              }
              nearObject = newProxyInstance(getClass().getClassLoader(), nearType, interfaces, (object, method, parameters) -> {
                  Object result;
                  if (logger.isTraceEnabled()) {
                      logger.trace("Facets getter: " + display(facetsGetter));
                  }
                  if (method.equals(facetsGetter)) {
                      result = facets;
                  } else if (method.equals(facetsChecker)) {
                      result = Boolean.TRUE;
                  } else {
                      Binding binding = methodMap.get(method);
                      if (binding == null) {
                          String message = "No binding found: " + display(nearType) + ": " + display(method);
                          logger.warn(message);
                          throw new UnsupportedOperationException(message);
                      }
                      result = binding.invoke(facets, parameters);
                      Class<?> returnType = method.getReturnType();
                      if (logger.isTraceEnabled()) {
                          logger.trace("Return type: " + displayWithTypes(returnType));
                      }
                      if (result instanceof TypedIterable) {
                          TypedIterable<?> typedIterable = (TypedIterable<?>) result;
                          Class<?> baseType = typedIterable.getType();
                          if (logger.isTraceEnabled()) {
                              logger.trace("Iterable base type: " + display(baseType));
                          }
                          if (registry.hasFarType(baseType)) {
                              Class<?> type = getNearType(baseType);
                              result = getAdaptedIterable(returnType, typedIterable, type);
                          } else if (registry.hasNearType(baseType)) {
                              result = getAdaptedIterable(returnType, typedIterable, baseType);
                          } else if (logger.isTraceEnabled()) {
                              logger.trace("Iterable base type not found in registry");
                          }
                      } else if (registry.hasNearType(returnType)) {
                          Class<?> farType1 = registry.getFarType(method.getReturnType());
                          if (logger.isTraceEnabled()) {
                              logger.trace("Far type of return type: " + display(farType1));
                          }
                          if (farType1.isInstance(result)) {
                              BridgeFactory factory = registry.getBridgeFactory(farType1);
                              if (logger.isTraceEnabled()) {
                                  logger.trace("Far type of return type factory: " + display(factory.getFarType()));
                                  logger.trace("Result: " + display(result));
                                  logger.trace("Return type: " + display(returnType) + ": factory PO type: " + display(factory.getNearType()));
                              }
                              try {
                                  result = factory.getNearObject(result);
                              } catch (ClassCastException exception) {
                                  if (logger.isTraceEnabled()) {
                                      logger.trace("Stack trace", exception);
                                  }
                                  throw exception;
                              }
                          }
                      } else if (logger.isTraceEnabled()) {
                          logger.trace("Not adapted");
                      }
                  }
                  return result;
              });
              facets.setNearObject(nearObject);
          }
          return nearObject;
      }