接口 GenerationContext
- 所有已知实现类:
DefaultGenerationContext
public interface GenerationContext
Central interface used for code generation.
A generation context provides:
- Management of all generated classes, including naming convention support.
- Central management of all generated files.
- Support for recording runtime hints.
If a dedicated round of code generation is required while processing, it
is possible to create a specialized context using withName(String).
- 从以下版本开始:
- 4.0
- 作者:
- Phillip Webb, Stephane Nicoll
-
方法概要
修饰符和类型方法说明Get theGeneratedClassesused by the context.Get theGeneratedFilesused by the context.Get theRuntimeHintsused by the context.Create a newGenerationContextinstance using the specified name to qualify generated assets for a dedicated round of code generation.
-
方法详细资料
-
getGeneratedClasses
GeneratedClasses getGeneratedClasses()Get theGeneratedClassesused by the context.All generated classes are written at the end of AOT processing.
- 返回:
- the generated classes
-
getGeneratedFiles
GeneratedFiles getGeneratedFiles()Get theGeneratedFilesused by the context.Used to write resource, java source, or class bytecode files.
- 返回:
- the generated files
-
getRuntimeHints
RuntimeHints getRuntimeHints()Get theRuntimeHintsused by the context.Used to record reflection, resource, serialization, and proxy hints so that the application can run as a native image.
- 返回:
- the runtime hints
-
withName
Create a newGenerationContextinstance using the specified name to qualify generated assets for a dedicated round of code generation.If the specified name is already in use, a unique sequence is added to ensure the name is unique.
- 参数:
name- the name to use- 返回:
- a specialized
GenerationContextfor the specified name
-