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
ConstructorDescriptionFileSystemGeneratedFiles
(Path root) Create a newFileSystemGeneratedFiles
instance with all files stored under the specificroot
.Create a newFileSystemGeneratedFiles
instance with all files stored under the root provided by the givenFunction
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFile
(GeneratedFiles.Kind kind, String path, InputStreamSource content) Add a generated file of the specifiedGeneratedFiles.Kind
with content from the givenInputStreamSource
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.aot.generate.GeneratedFiles
addClassFile, addFile, addFile, addResourceFile, addResourceFile, addResourceFile, addSourceFile, addSourceFile, addSourceFile, addSourceFile
-
Constructor Details
-
FileSystemGeneratedFiles
Create a newFileSystemGeneratedFiles
instance with all files stored under the specificroot
. The following subdirectories are created for the different filekinds
:sources
resources
classes
- Parameters:
root
- the root path- See Also:
-
FileSystemGeneratedFiles
Create a newFileSystemGeneratedFiles
instance 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:GeneratedFiles
Add a generated file of the specifiedGeneratedFiles.Kind
with content from the givenInputStreamSource
.- Specified by:
addFile
in interfaceGeneratedFiles
- Parameters:
kind
- the kind of file being writtenpath
- the relative path of the filecontent
- anInputStreamSource
that will provide an input stream containing the file contents
-