Class TraitCodegenContext
java.lang.Object
software.amazon.smithy.traitcodegen.TraitCodegenContext
- All Implemented Interfaces:
CodegenContext<TraitCodegenSettings,
TraitCodegenWriter, TraitCodegenIntegration>
public final class TraitCodegenContext
extends Object
implements CodegenContext<TraitCodegenSettings,TraitCodegenWriter,TraitCodegenIntegration>
Contextual information that is made available during most parts of trait code generation.
-
Method Details
-
model
- Specified by:
model
in interfaceCodegenContext<TraitCodegenSettings,
TraitCodegenWriter, TraitCodegenIntegration> - Returns:
- Gets the model being code generated.
-
settings
- Specified by:
settings
in interfaceCodegenContext<TraitCodegenSettings,
TraitCodegenWriter, TraitCodegenIntegration> - Returns:
- Gets code generation settings.
-
symbolProvider
- Specified by:
symbolProvider
in interfaceCodegenContext<TraitCodegenSettings,
TraitCodegenWriter, TraitCodegenIntegration> - Returns:
- Gets the SymbolProvider used for code generation.
-
fileManifest
- Specified by:
fileManifest
in interfaceCodegenContext<TraitCodegenSettings,
TraitCodegenWriter, TraitCodegenIntegration> - Returns:
- Gets the FileManifest being written to for code generation.
-
writerDelegator
Description copied from interface:CodegenContext
Get the WriterDelegator used for generating code.Generates might need other delegators for specific purposes, and it's fine to add more methods for those specific purposes. If an implementation uses a specific subclass of a WriterDelegator, implementations can override this method to return a more specific WriterDelegator type.
- Specified by:
writerDelegator
in interfaceCodegenContext<TraitCodegenSettings,
TraitCodegenWriter, TraitCodegenIntegration> - Returns:
- Returns the writer delegator used by the generator.
-
integrations
- Specified by:
integrations
in interfaceCodegenContext<TraitCodegenSettings,
TraitCodegenWriter, TraitCodegenIntegration> - Returns:
- Gets the SmithyIntegrations used for code generation.
-