Package org.springframework.aot.generate
Interface GeneratedFiles
- All Known Implementing Classes:
- FileSystemGeneratedFiles,- InMemoryGeneratedFiles
public interface GeneratedFiles
Interface that can be used to add 
source,
 resource, or class files generated
 during ahead-of-time processing. Source and resource files are written using
 UTF-8 encoding.- Since:
- 6.0
- Author:
- Phillip Webb, Brian Clozel, Stephane Nicoll
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic enumThe various kinds of generated files that are supported.
- 
Method SummaryModifier and TypeMethodDescriptiondefault voidaddClassFile(String path, InputStreamSource content) Add a generatedclass filewith content from the givenInputStreamSource.default voidaddFile(GeneratedFiles.Kind kind, String path, CharSequence content) Add a generated file of the specifiedGeneratedFiles.Kindwith content from the givenCharSequence.voidaddFile(GeneratedFiles.Kind kind, String path, InputStreamSource content) Add a generated file of the specifiedGeneratedFiles.Kindwith content from the givenInputStreamSource.default voidaddFile(GeneratedFiles.Kind kind, String path, ThrowingConsumer<Appendable> content) Add a generated file of the specifiedGeneratedFiles.Kindwith content written to anAppendablepassed to the givenThrowingConsumer.default voidaddResourceFile(String path, CharSequence content) Add a generatedresource filewith content from the givenCharSequence.default voidaddResourceFile(String path, InputStreamSource content) Add a generatedresource filewith content from the givenInputStreamSource.default voidaddResourceFile(String path, ThrowingConsumer<Appendable> content) Add a generatedresource filewith content written to anAppendablepassed to the givenThrowingConsumer.default voidaddSourceFile(String className, CharSequence content) Add a generatedsource filewith content from the givenCharSequence.default voidaddSourceFile(String className, InputStreamSource content) Add a generatedsource filewith content from the givenInputStreamSource.default voidaddSourceFile(String className, ThrowingConsumer<Appendable> content) Add a generatedsource filewith content written to anAppendablepassed to the givenThrowingConsumer.default voidaddSourceFile(org.springframework.javapoet.JavaFile javaFile) Add a generatedsource filewith content from the givenJavaFile.
- 
Method Details- 
addSourceFiledefault void addSourceFile(org.springframework.javapoet.JavaFile javaFile) Add a generatedsource filewith content from the givenJavaFile.- Parameters:
- javaFile- the java file to add
 
- 
addSourceFileAdd a generatedsource filewith content from the givenCharSequence.- Parameters:
- className- the class name that should be used to determine the path of the file
- content- the contents of the file
 
- 
addSourceFileAdd a generatedsource filewith content written to anAppendablepassed to the givenThrowingConsumer.- Parameters:
- className- the class name that should be used to determine the path of the file
- content- a- ThrowingConsumerthat accepts an- Appendablewhich will receive the file contents
 
- 
addSourceFileAdd a generatedsource filewith content from the givenInputStreamSource.- Parameters:
- className- the class name that should be used to determine the path of the file
- content- an- InputStreamSourcethat will provide an input stream containing the file contents
 
- 
addResourceFileAdd a generatedresource filewith content from the givenCharSequence.- Parameters:
- path- the relative path of the file
- content- the contents of the file
 
- 
addResourceFileAdd a generatedresource filewith content written to anAppendablepassed to the givenThrowingConsumer.- Parameters:
- path- the relative path of the file
- content- a- ThrowingConsumerthat accepts an- Appendablewhich will receive the file contents
 
- 
addResourceFileAdd a generatedresource filewith content from the givenInputStreamSource.- Parameters:
- path- the relative path of the file
- content- an- InputStreamSourcethat will provide an input stream containing the file contents
 
- 
addClassFileAdd a generatedclass filewith content from the givenInputStreamSource.- Parameters:
- path- the relative path of the file
- content- an- InputStreamSourcethat will provide an input stream containing the file contents
 
- 
addFileAdd a generated file of the specifiedGeneratedFiles.Kindwith content from the givenCharSequence.- Parameters:
- kind- the kind of file being written
- path- the relative path of the file
- content- the contents of the file
 
- 
addFileAdd a generated file of the specifiedGeneratedFiles.Kindwith content written to anAppendablepassed to the givenThrowingConsumer.- Parameters:
- kind- the kind of file being written
- path- the relative path of the file
- content- a- ThrowingConsumerthat accepts an- Appendablewhich will receive the file contents
 
- 
addFileAdd a generated file of the specifiedGeneratedFiles.Kindwith content from the givenInputStreamSource.- Parameters:
- kind- the kind of file being written
- path- the relative path of the file
- content- an- InputStreamSourcethat will provide an input stream containing the file contents
 
 
-