Package org.springframework.aot.generate
Class GeneratedClasses
java.lang.Object
org.springframework.aot.generate.GeneratedClasses
A managed collection of generated classes. This class is stateful so the
same instance should be used for all class generation.
- Since:
- 6.0
- Author:
- Phillip Webb, Stephane Nicoll
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionGeneratedClasses(ClassNameGenerator classNameGenerator) Create a new instance using the specified naming conventions. -
Method Summary
Modifier and TypeMethodDescriptionforFeature(String featureName) Prepare aGeneratedClassfor the specifiedfeatureNameand no particular component.forFeatureComponent(String featureName, Class<?> component) voidwriteTo(GeneratedFiles generatedFiles) Write thegenerated classesusing the givenGeneratedFilesinstance.
-
Constructor Details
-
GeneratedClasses
Create a new instance using the specified naming conventions.- Parameters:
classNameGenerator- the class name generator to use
-
-
Method Details
-
forFeatureComponent
- Parameters:
featureName- the name of the feature to associate with the generated classcomponent- the target component- Returns:
- a
GeneratedClasses.Builderfor further configuration
-
forFeature
Prepare aGeneratedClassfor the specifiedfeatureNameand no particular component. This should be used for high-level code generation that are widely applicable and for entry points.- Parameters:
featureName- the name of the feature to associate with the generated class- Returns:
- a
GeneratedClasses.Builderfor further configuration
-
writeTo
Write thegenerated classesusing the givenGeneratedFilesinstance.- Parameters:
generatedFiles- where to write the generated classes- Throws:
IOException- on IO error
-