Package org.springframework.aot.generate
Interface GenerationContext
- All Known Implementing Classes:
DefaultGenerationContext
public interface GenerationContext
Central interface used for code generation.
A generation context provides:
- Support for
class name generation
. - Central management of all
generated files
. - Support for the recording of
runtime hints
.
- Since:
- 6.0
- Author:
- Phillip Webb, Stephane Nicoll
-
Method Summary
Modifier and TypeMethodDescriptionReturn theGeneratedClasses
being used by the context.Return theClassNameGenerator
being used by the context.Return theGeneratedFiles
being used by the context.Return theRuntimeHints
being used by the context.
-
Method Details
-
getClassNameGenerator
ClassNameGenerator getClassNameGenerator()Return theClassNameGenerator
being used by the context. Allows new class names to be generated before they are added to thegenerated files
.- Returns:
- the class name generator
- See Also:
-
getClassGenerator
ClassGenerator getClassGenerator()Return theGeneratedClasses
being used by the context. Allows a single generated class to be shared across multiple AOT processors. All generated classes are written at the end of AOT processing.- Returns:
- the generated classes
-
getGeneratedFiles
GeneratedFiles getGeneratedFiles()Return theGeneratedFiles
being used by the context. Used to write resource, java source or class bytecode files.- Returns:
- the generated files
-
getRuntimeHints
RuntimeHints getRuntimeHints()Return theRuntimeHints
being used by the context. Used to recordreflection
,resource
,serialization
andproxy
hints so that the application can run as a native image.- Returns:
- the runtime hints
-