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 theGeneratedClassesbeing used by the context.Return theClassNameGeneratorbeing used by the context.Return theGeneratedFilesbeing used by the context.Return theRuntimeHintsbeing used by the context.
-
Method Details
-
getClassNameGenerator
ClassNameGenerator getClassNameGenerator()Return theClassNameGeneratorbeing 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 theGeneratedClassesbeing 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 theGeneratedFilesbeing used by the context. Used to write resource, java source or class bytecode files.- Returns:
- the generated files
-
getRuntimeHints
RuntimeHints getRuntimeHints()Return theRuntimeHintsbeing used by the context. Used to recordreflection,resource,serializationandproxyhints so that the application can run as a native image.- Returns:
- the runtime hints
-