code: public VersionInfo merge() {
      if (isReference()) {
        final VersionInfo refVersion = (VersionInfo) getCheckedRef(VersionInfo.class, "VersionInfo");
        return refVersion.merge();
      }
      Reference currentRef = this.getExtends();
      if (currentRef == null) {
        return this;
      }
      final Vector<VersionInfo> stack = new Vector<>(5);
      stack.addElement(this);
      while (currentRef != null) {
        final Object obj = currentRef.getReferencedObject(getProject());
        if (obj instanceof VersionInfo) {
          VersionInfo current = (VersionInfo) obj;
          if (current.isReference()) {
            current = (VersionInfo) current.getCheckedRef(VersionInfo.class, "VersionInfo");
          }
          if (stack.contains(current)) {
            throw this.circularReference();
          }
          stack.addElement(current);
          currentRef = current.getExtends();
        } else {
          throw new BuildException("Referenced element " + currentRef.getRefId() + " is not a versioninfo.");
        }
      }
      return new VersionInfo(stack);
    }
docs: Returns a VersionInfo that reflects any inherited version information.
  
  @return merged version information.
  \