code: static PathFileObject createSiblingPathFileObject(JavacPathFileManager fileManager,
              final Path path, final String relativePath) {
          return new PathFileObject(fileManager, path) {
              @Override
              String inferBinaryName(Iterable<? extends Path> paths) {
                  return toBinaryName(relativePath, "/");
              }
          };
      }
docs: Create a PathFileObject whose binary name can be inferred from the
  relative path to a sibling.