Package org.springframework.aot.generate
Class FileSystemGeneratedFiles
java.lang.Object
org.springframework.aot.generate.FileSystemGeneratedFiles
- All Implemented Interfaces:
GeneratedFiles
GeneratedFiles implementation that stores generated files using a
FileSystem.- Since:
- 6.0
- Author:
- Phillip Webb
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.aot.generate.GeneratedFiles
GeneratedFiles.Kind -
Constructor Summary
ConstructorsConstructorDescriptionFileSystemGeneratedFiles(Path root) Create a newFileSystemGeneratedFilesinstance with all files stored under the specificroot.Create a newFileSystemGeneratedFilesinstance with all files stored under the root provided by the givenFunction. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFile(GeneratedFiles.Kind kind, String path, InputStreamSource content) Add a generated file of the specifiedGeneratedFiles.Kindwith content from the givenInputStreamSource.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.aot.generate.GeneratedFiles
addClassFile, addFile, addFile, addResourceFile, addResourceFile, addResourceFile, addSourceFile, addSourceFile, addSourceFile, addSourceFile
-
Constructor Details
-
FileSystemGeneratedFiles
Create a newFileSystemGeneratedFilesinstance with all files stored under the specificroot. The following subdirectories are created for the different filekinds:sourcesresourcesclasses
- Parameters:
root- the root path- See Also:
-
FileSystemGeneratedFiles
Create a newFileSystemGeneratedFilesinstance with all files stored under the root provided by the givenFunction.- Parameters:
roots- a function that returns the root to use for the givenGeneratedFiles.Kind
-
-
Method Details
-
addFile
Description copied from interface:GeneratedFilesAdd a generated file of the specifiedGeneratedFiles.Kindwith content from the givenInputStreamSource.- Specified by:
addFilein interfaceGeneratedFiles- Parameters:
kind- the kind of file being writtenpath- the relative path of the filecontent- anInputStreamSourcethat will provide an input stream containing the file contents
-