Package org.springframework.aot.generate
Class GeneratedClasses
java.lang.Object
org.springframework.aot.generate.GeneratedClasses
- All Implemented Interfaces:
ClassGenerator
A managed collection of generated classes.
- Since:
- 6.0
- Author:
- Phillip Webb
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.aot.generate.ClassGenerator
ClassGenerator.JavaFileGenerator
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetOrGenerateClass
(ClassGenerator.JavaFileGenerator javaFileGenerator, Class<?> target, String featureName) Get or generate a newGeneratedClass
for a given java file generator, target and feature name.getOrGenerateClass
(ClassGenerator.JavaFileGenerator javaFileGenerator, String target, String featureName) Get or generate a newGeneratedClass
for a given java file generator, target and feature name.void
writeTo
(GeneratedFiles generatedFiles) Write generated Spring.factories
files to the givenGeneratedFiles
instance.
-
Constructor Details
-
GeneratedClasses
-
-
Method Details
-
getOrGenerateClass
public GeneratedClass getOrGenerateClass(ClassGenerator.JavaFileGenerator javaFileGenerator, Class<?> target, String featureName) Description copied from interface:ClassGenerator
Get or generate a newGeneratedClass
for a given java file generator, target and feature name.- Specified by:
getOrGenerateClass
in interfaceClassGenerator
- Parameters:
javaFileGenerator
- the java file generatortarget
- the target of the newly generated classfeatureName
- the name of the feature that the generated class supports- Returns:
- a
GeneratedClass
instance
-
getOrGenerateClass
public GeneratedClass getOrGenerateClass(ClassGenerator.JavaFileGenerator javaFileGenerator, String target, String featureName) Description copied from interface:ClassGenerator
Get or generate a newGeneratedClass
for a given java file generator, target and feature name.- Specified by:
getOrGenerateClass
in interfaceClassGenerator
- Parameters:
javaFileGenerator
- the java file generatortarget
- the target of the newly generated classfeatureName
- the name of the feature that the generated class supports- Returns:
- a
GeneratedClass
instance
-
writeTo
Write generated Spring.factories
files to the givenGeneratedFiles
instance.- Parameters:
generatedFiles
- where to write the generated files- Throws:
IOException
- on IO error
-