类 DefaultGenerationContext
java.lang.Object
cn.taketoday.aot.generate.DefaultGenerationContext
- 所有已实现的接口:
GenerationContext
Default
GenerationContext implementation.
Generated classes can be flushed out using writeGeneratedContent()
which should be called only once after the generation process using this instance
has completed.
- 从以下版本开始:
- 4.0
- 作者:
- Phillip Webb, Stephane Nicoll, Sam Brannen, Harry Yang
-
字段概要
字段修饰符和类型字段说明private final GeneratedClassesprivate final GeneratedFilesprivate final RuntimeHintsprivate final Map<String,AtomicInteger> -
构造器概要
构造器限定符构造器说明DefaultGenerationContext(ClassNameGenerator classNameGenerator, GeneratedFiles generatedFiles) Create a newDefaultGenerationContextinstance backed by the specifiedClassNameGeneratorandGeneratedFiles.DefaultGenerationContext(ClassNameGenerator classNameGenerator, GeneratedFiles generatedFiles, RuntimeHints runtimeHints) Create a newDefaultGenerationContextinstance backed by the specifiedClassNameGenerator,GeneratedFiles, andRuntimeHints.protectedDefaultGenerationContext(DefaultGenerationContext existing, String featureName) Create a newDefaultGenerationContextinstance based on the suppliedexistingcontext and feature name.protectedDefaultGenerationContext(GeneratedClasses generatedClasses, GeneratedFiles generatedFiles, RuntimeHints runtimeHints) Create a newDefaultGenerationContextinstance backed by the specified items. -
方法概要
修饰符和类型方法说明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.voidWrite any generated content out to the generated files.
-
字段详细资料
-
sequenceGenerator
-
generatedClasses
-
generatedFiles
-
runtimeHints
-
-
构造器详细资料
-
DefaultGenerationContext
public DefaultGenerationContext(ClassNameGenerator classNameGenerator, GeneratedFiles generatedFiles) Create a newDefaultGenerationContextinstance backed by the specifiedClassNameGeneratorandGeneratedFiles.- 参数:
classNameGenerator- the naming convention to use for generated class namesgeneratedFiles- the generated files
-
DefaultGenerationContext
public DefaultGenerationContext(ClassNameGenerator classNameGenerator, GeneratedFiles generatedFiles, RuntimeHints runtimeHints) Create a newDefaultGenerationContextinstance backed by the specifiedClassNameGenerator,GeneratedFiles, andRuntimeHints.- 参数:
classNameGenerator- the naming convention to use for generated class namesgeneratedFiles- the generated filesruntimeHints- the runtime hints
-
DefaultGenerationContext
protected DefaultGenerationContext(GeneratedClasses generatedClasses, GeneratedFiles generatedFiles, RuntimeHints runtimeHints) Create a newDefaultGenerationContextinstance backed by the specified items.- 参数:
generatedClasses- the generated classesgeneratedFiles- the generated filesruntimeHints- the runtime hints
-
DefaultGenerationContext
Create a newDefaultGenerationContextinstance based on the suppliedexistingcontext and feature name.- 参数:
existing- the existing context upon which to base the new onefeatureName- the feature name to use
-
-
方法详细资料
-
getGeneratedClasses
从接口复制的说明:GenerationContextGet theGeneratedClassesused by the context.All generated classes are written at the end of AOT processing.
- 指定者:
getGeneratedClasses在接口中GenerationContext- 返回:
- the generated classes
-
getGeneratedFiles
从接口复制的说明:GenerationContextGet theGeneratedFilesused by the context.Used to write resource, java source, or class bytecode files.
- 指定者:
getGeneratedFiles在接口中GenerationContext- 返回:
- the generated files
-
getRuntimeHints
从接口复制的说明:GenerationContextGet theRuntimeHintsused by the context.Used to record reflection, resource, serialization, and proxy hints so that the application can run as a native image.
- 指定者:
getRuntimeHints在接口中GenerationContext- 返回:
- the runtime hints
-
withName
从接口复制的说明:GenerationContextCreate 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.
- 指定者:
withName在接口中GenerationContext- 参数:
name- the name to use- 返回:
- a specialized
GenerationContextfor the specified name
-
writeGeneratedContent
public void writeGeneratedContent()Write any generated content out to the generated files.
-