Top Description Methods
org.springframework.aot.generate

public Interface GenerationContext

Known Direct Implementers
org.springframework.aot.generate.DefaultGenerationContext
Imports
org.springframework.aot.hint.ProxyHints, .ReflectionHints, .ResourceHints, .RuntimeHints, .SerializationHints

Central interface used for code generation.

A generation context provides:

If a dedicated round of code generation is required while processing, it is possible to create a specialized context using withName(String).

Authors
Phillip Webb, Stephane Nicoll
Since
6.0

Method Summary

Modifier and TypeMethod and Description
public GeneratedClasses

Returns:

the generated classes
getGeneratedClasses
()

Get the GeneratedClasses used by the context.

public GeneratedFiles

Returns:

the generated files
getGeneratedFiles
()

Get the GeneratedFiles used by the context.

public RuntimeHints

Returns:

the runtime hints
getRuntimeHints
()

Get the RuntimeHints used by the context.

public GenerationContext

Returns:

a specialized GenerationContext for the specified name
withName
(String
the name to use
name
)

Create a new GenerationContext instance using the specified name to qualify generated assets for a dedicated round of code generation.

Method Detail

getGeneratedClassesback to summary
public GeneratedClasses getGeneratedClasses()

Get the GeneratedClasses used by the context.

All generated classes are written at the end of AOT processing.

Returns:GeneratedClasses

the generated classes

getGeneratedFilesback to summary
public GeneratedFiles getGeneratedFiles()

Get the GeneratedFiles used by the context.

Used to write resource, java source, or class bytecode files.

Returns:GeneratedFiles

the generated files

getRuntimeHintsback to summary
public RuntimeHints getRuntimeHints()

Get the RuntimeHints used by the context.

Used to record reflection, resource, serialization, and proxy hints so that the application can run as a native image.

Returns:RuntimeHints

the runtime hints

withNameback to summary
public GenerationContext withName(String name)

Create a new GenerationContext instance 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.

Parameters
name:String

the name to use

Returns:GenerationContext

a specialized GenerationContext for the specified name