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
ConstructorDescriptionCreate an instance usingTestTarget
as 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 usingTestTarget
as thetarget
.
-
-
Method Details
-
getGeneratedFiles
Description copied from interface:GenerationContext
Get theGeneratedFiles
used by the context.Used to write resource, java source, or class bytecode files.
- Specified by:
getGeneratedFiles
in interfaceGenerationContext
- Overrides:
getGeneratedFiles
in classDefaultGenerationContext
- Returns:
- the generated files
-