Class DefaultProjectAssetGenerator
java.lang.Object
io.spring.initializr.generator.project.DefaultProjectAssetGenerator
- All Implemented Interfaces:
ProjectAssetGenerator<Path>
A default
ProjectAssetGenerator implementation that generates a directory
structure with all available project contributors. Uses a
ProjectDirectoryFactory to determine the root directory to use based on a
ProjectDescription.- Author:
- Stephane Nicoll
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new instance without an explicitProjectDirectoryFactory.DefaultProjectAssetGenerator(ProjectDirectoryFactory projectDirectoryFactory) Create a new instance with theProjectDirectoryFactoryto use. -
Method Summary
Modifier and TypeMethodDescriptiongenerate(ProjectGenerationContext context) Generate project assets using the specifiedProjectGenerationContext.
-
Constructor Details
-
DefaultProjectAssetGenerator
Create a new instance with theProjectDirectoryFactoryto use.- Parameters:
projectDirectoryFactory- the project directory factory to use
-
DefaultProjectAssetGenerator
public DefaultProjectAssetGenerator()Create a new instance without an explicitProjectDirectoryFactory. A bean of that type is expected to be available in the context.
-
-
Method Details
-
generate
Description copied from interface:ProjectAssetGeneratorGenerate project assets using the specifiedProjectGenerationContext.- Specified by:
generatein interfaceProjectAssetGenerator<Path>- Parameters:
context- the context to use- Returns:
- the type that gathers the project assets
- Throws:
IOException- if writing project assets failed
-