code: final PathEntry addPathEntry(final String pathName, final String path, final String relativeTo, final boolean readOnly) {
          PathEntry pathEntry;
          synchronized (pathEntries) {
              if (pathEntries.containsKey(pathName)) {
                  throw ControllerLogger.ROOT_LOGGER.pathEntryAlreadyExists(pathName);
              }
              pathEntry = new PathEntry(pathName, path, relativeTo, readOnly, relativeTo == null ? absoluteResolver : relativeResolver);
              pathEntries.put(pathName, pathEntry);
  
              if (relativeTo != null) {
                  addDependent(pathName, relativeTo);
              }
          }
          triggerCallbacksForEvent(pathEntry, Event.ADDED);
          return pathEntry;
      }
docs: Adds an entry for a path and sends an {@link org.jboss.as.controller.services.path.PathManager.Event#ADDED}
  notification to any registered {@linkplain org.jboss.as.controller.services.path.PathManager.Callback callbacks}.
  
  @param pathName the logical name of the path within the model. Cannot be {@code null}
  @param path  the value of the path within the model. This is either an absolute path or
  the relative portion of the path. Cannot be {@code null}
  @param relativeTo the name of the path this path is relative to. If {@code null} this is an absolute path
  @param readOnly {@code true} if the path is immutable, and cannot be removed or modified via a management operation
  @return the entry that represents the path
  
  @throws RuntimeException if an entry with the given {@code pathName} is already registered