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, Stephane Nicoll
- 
Nested Class SummaryNested classes/interfaces inherited from interface GeneratedFilesGeneratedFiles.FileHandler, GeneratedFiles.Kind
- 
Constructor SummaryConstructorsConstructorDescriptionFileSystemGeneratedFiles(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 SummaryModifier and TypeMethodDescriptionvoidhandleFile(GeneratedFiles.Kind kind, String path, ThrowingConsumer<GeneratedFiles.FileHandler> handler) Handle a generated file of the specifiedGeneratedFiles.Kindwith the given handler.Methods inherited from class Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface GeneratedFilesaddClassFile, addFile, addFile, addFile, addResourceFile, addResourceFile, addResourceFile, addSourceFile, addSourceFile, addSourceFile, addSourceFile
- 
Constructor Details- 
FileSystemGeneratedFilesCreate a newFileSystemGeneratedFilesinstance 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:
 
- 
FileSystemGeneratedFilesCreate 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 given- GeneratedFiles.Kind
 
 
- 
- 
Method Details- 
handleFilepublic void handleFile(GeneratedFiles.Kind kind, String path, ThrowingConsumer<GeneratedFiles.FileHandler> handler) Description copied from interface:GeneratedFilesHandle a generated file of the specifiedGeneratedFiles.Kindwith the given handler. The file handler lets you consume the content of the already generated file, if any and provide a way to override its content if necessary.- Specified by:
- handleFilein interface- GeneratedFiles
- Parameters:
- kind- the kind of file
- path- the relative path of the file
- handler- a consumer of a- GeneratedFiles.FileHandlerfor the file
 
 
-