@Override
  public <T extends ExternalizableGraphElement> T readGraphElement() throws IOException {
    try {
      MethodHandle constructor;
      String className = readUTF();
      Class<?> elemType = Class.forName(className);
      if (FactoredExternalizableGraphElement.class.isAssignableFrom(elemType)) {
        ExternalizableGraphElement factorData = readGraphElement();
        constructor = ourLookup.findConstructor(elemType, MethodType.methodType(void.class, factorData.getClass(), GraphDataInput.class)).bindTo(factorData);
      }
      else {
        constructor = ourLookup.findConstructor(elemType, ourDefaultReadConstructorType);
      }
      //noinspection unchecked
      return processLoadedGraphElement((T)constructor.invoke(this));
    }
    catch(IOException e) {
      throw e;
    }
    catch (Throwable e) {
      throw new IOException(e);
    }
  }
@Override
  public <T extends ExternalizableGraphElement> T readGraphElement()