Class TestGenerationContext
java.lang.Object
org.springframework.aot.generate.DefaultGenerationContext
org.springframework.aot.test.generate.TestGenerationContext
- All Implemented Interfaces:
GenerationContext
GenerationContext test implementation that uses
InMemoryGeneratedFiles.- Since:
- 6.0
- Author:
- Stephane Nicoll, Sam Brannen
-
Constructor Summary
ConstructorsConstructorDescriptionCreate an instance usingTestTargetas thetarget.TestGenerationContext(Class<?> target) Create an instance using the specifiedtarget.TestGenerationContext(ClassNameGenerator classNameGenerator) Create an instance using the specifiedClassNameGenerator. -
Method Summary
Methods inherited from class org.springframework.aot.generate.DefaultGenerationContext
getGeneratedClasses, getRuntimeHints, withName, writeGeneratedContent
-
Constructor Details
-
TestGenerationContext
Create an instance using the specifiedClassNameGenerator.- Parameters:
classNameGenerator- the class name generator to use
-
TestGenerationContext
Create an instance using the specifiedtarget.- Parameters:
target- the default target class to use
-
TestGenerationContext
public TestGenerationContext()Create an instance usingTestTargetas thetarget.
-
-
Method Details
-
getGeneratedFiles
Description copied from interface:GenerationContextGet theGeneratedFilesused by the context.Used to write resource, java source, or class bytecode files.
- Specified by:
getGeneratedFilesin interfaceGenerationContext- Overrides:
getGeneratedFilesin classDefaultGenerationContext- Returns:
- the generated files
-