class DefaultProjectAssetGenerator implements ProjectAssetGenerator<Path> {

	private final ProjectDirectoryFactory projectDirectoryFactory;

	/**
	 * Create a new instance with the {@link ProjectDirectoryFactory} to use.
	 * @param projectDirectoryFactory the project directory factory to use
	 */
	public DefaultProjectAssetGenerator(ProjectDirectoryFactory projectDirectoryFactory) {
		this.projectDirectoryFactory = projectDirectoryFactory;
	}

	/**
	 * Create a new instance without an explicit {@link ProjectDirectoryFactory}. A bean
	 * of that type is expected to be available in the context.
	 */
	public DefaultProjectAssetGenerator() {
		this(null);
	}

	@Override
	public Path generate(ProjectGenerationContext context) throws IOException {<FILL_FUNCTION_BODY>}

	private ProjectDirectoryFactory resolveProjectDirectoryFactory(ProjectGenerationContext context) {
		return (this.projectDirectoryFactory != null) ? this.projectDirectoryFactory
				: context.getBean(ProjectDirectoryFactory.class);
	}

	private Path initializerProjectDirectory(Path rootDir, ProjectDescription description) throws IOException {
		Path projectDirectory = resolveProjectDirectory(rootDir, description);
		Files.createDirectories(projectDirectory);
		return projectDirectory;
	}

	private Path resolveProjectDirectory(Path rootDir, ProjectDescription description) {
		if (description.getBaseDirectory() != null) {
			return rootDir.resolve(description.getBaseDirectory());
		}
		return rootDir;
	}

}

		ProjectDescription description = context.getBean(ProjectDescription.class);
		Path projectRoot = resolveProjectDirectoryFactory(context).createProjectDirectory(description);
		Path projectDirectory = initializerProjectDirectory(projectRoot, description);
		List<ProjectContributor> contributors = context.getBeanProvider(ProjectContributor.class)
			.orderedStream()
			.toList();
		for (ProjectContributor contributor : contributors) {
			contributor.contribute(projectDirectory);
		}
		return projectRoot;
	
<no_super_class>