Uses of Class
org.springframework.core.test.tools.SourceFile
Packages that use SourceFile
Package
Description
Support classes for compiling and testing generated code.
-
Uses of SourceFile in org.springframework.core.test.tools
Methods in org.springframework.core.test.tools that return SourceFileModifier and TypeMethodDescriptionstatic SourceFileFactory method to create a newSourceFileby looking up source for the givenClass.static SourceFileSourceFile.forTestClass(Class<?> type) Factory method to create a newSourceFileby looking up source for the given testClass.Get theSourceFilewith the given path.SourceFiles.getSingle()Return the single source file contained in the collection.Return the single matching source file contained in the collection.SourceFiles.getSingleFromPackage(String packageName) Return a single source file contained in the specified package.Compiled.getSourceFile()Return the single source file that was compiled.Compiled.getSourceFile(String pattern) Return the single matching source file that was compiled.Compiled.getSourceFileFromPackage(String packageName) Return the single source file that was compiled in the given package.static SourceFileSourceFile.of(CharSequence charSequence) Factory method to create a newSourceFilefrom the givenCharSequence.static SourceFileSourceFile.of(String path, CharSequence charSequence) Factory method to create a newSourceFilefrom the givenCharSequence.static SourceFileSourceFile.of(String path, InputStreamSource inputStreamSource) Factory method to create a newSourceFilefrom the givenInputStreamSource.static SourceFileSourceFile.of(String path, WritableContent writableContent) Factory method to create a newSourceFilefrom the givenWritableContent.static SourceFileSourceFile.of(InputStreamSource inputStreamSource) Factory method to create a newSourceFilefrom the givenInputStreamSource.static SourceFileSourceFile.of(WritableContent writableContent) Factory method to create a newSourceFilefrom the givenWritableContent.Methods in org.springframework.core.test.tools that return types with arguments of type SourceFileModifier and TypeMethodDescriptionSourceFiles.iterator()SourceFiles.stream()Stream theSourceFileinstances contained in this collection.Methods in org.springframework.core.test.tools with parameters of type SourceFileModifier and TypeMethodDescriptionSourceFiles.and(SourceFile... sourceFiles) Return a newSourceFilesinstance that merges files from another array ofSourceFileinstances.voidTestCompiler.compile(SourceFile sourceFile, Consumer<Compiled> compiled) Compile content from this instance along with the additional provided source file.static SourceFilesSourceFiles.of(SourceFile... sourceFiles) Factory method that can be used to create aSourceFilesinstance containing the specified files.TestCompiler.withSources(SourceFile... sourceFiles) Create a newTestCompilerinstance with additional source files.Method parameters in org.springframework.core.test.tools with type arguments of type SourceFileModifier and TypeMethodDescriptionSourceFiles.and(Iterable<SourceFile> sourceFiles) Return a newSourceFilesinstance that merges files from another array ofSourceFileinstances.TestCompiler.withSources(Iterable<SourceFile> sourceFiles) Create a newTestCompilerinstance with additional source files.