Interface CodegenContext<S,W extends SymbolWriter<W,?>,I extends SmithyIntegration<S,W,?>>

Type Parameters:
S - The settings object used to configure the generator.
W - The type of SymbolWriter used by the generator.
I - The type of SmithyIntegrations used by the generator.
All Known Implementing Classes:
DocGenerationContext, TraitCodegenContext

public interface CodegenContext<S,W extends SymbolWriter<W,?>,I extends SmithyIntegration<S,W,?>>
A context object that can be used during code generation and is used by SmithyIntegration.
  • Method Details

    • model

      Model model()
      Returns:
      Gets the model being code generated.
    • settings

      S settings()
      Returns:
      Gets code generation settings.
    • symbolProvider

      SymbolProvider symbolProvider()
      Returns:
      Gets the SymbolProvider used for code generation.
    • fileManifest

      FileManifest fileManifest()
      Returns:
      Gets the FileManifest being written to for code generation.
    • sharedFileManifest

      default Optional<FileManifest> sharedFileManifest()
      Gets the FileManifest used to create files in the projection's shared file space.

      All files written by a generator should either be written using this manifest or the generator's isolated manifest (fileManifest()).

      Files written to this manifest may be read or modified by other Smithy build plugins. Generators SHOULD NOT write files to this manifest unless they specifically intend for them to be consumed by other plugins. Files that are not intended to be shared should be written to the manifest from fileManifest().

      Returns:
      Gets the optional FileManifest used to create files in the projection's shared file space.
    • writerDelegator

      WriterDelegator<W> writerDelegator()
      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.

      Returns:
      Returns the writer delegator used by the generator.
    • integrations

      List<I> integrations()
      Returns:
      Gets the SmithyIntegrations used for code generation.