Interface DirectedCodegen<C extends CodegenContext<S,​?,​I>,​S,​I extends SmithyIntegration<S,​?,​C>>

    • Method Detail

      • createContext

        C createContext​(CreateContextDirective<S,​I> directive)
        Creates the codegen context object.
        Parameters:
        directive - Directive context data.
        Returns:
        Returns the created context object used by the rest of the directed generation.
      • generateService

        void generateService​(GenerateServiceDirective<C,​S> directive)
        Generates the code needed for a service shape.
        Parameters:
        directive - Directive to perform.
      • generateResource

        default void generateResource​(GenerateResourceDirective<C,​S> directive)
        Generates the code needed for a resource shape.
        Parameters:
        directive - Directive to perform.
      • generateOperation

        default void generateOperation​(GenerateOperationDirective<C,​S> directive)
        Generates the code needed for an operation shape.
        Parameters:
        directive - Directive to perform.
      • generateStructure

        void generateStructure​(GenerateStructureDirective<C,​S> directive)
        Generates the code needed for a structure shape.

        This method should not be invoked for structures marked with the error trait.

        Parameters:
        directive - Directive to perform.
      • generateError

        void generateError​(GenerateErrorDirective<C,​S> directive)
        Generates the code needed for an error structure.
        Parameters:
        directive - Directive to perform.
      • generateUnion

        void generateUnion​(GenerateUnionDirective<C,​S> directive)
        Generates the code needed for a union shape.
        Parameters:
        directive - Directive to perform.
      • generateList

        default void generateList​(GenerateListDirective<C,​S> directive)
        Generates any code needed for a list shape.
        Parameters:
        directive - Directive to perform.
      • generateMap

        default void generateMap​(GenerateMapDirective<C,​S> directive)
        Generates any code needed for a map shape.
        Parameters:
        directive - Directive to perform.
      • generateEnumShape

        void generateEnumShape​(GenerateEnumDirective<C,​S> directive)
        Generates the code needed for an enum shape, whether it's a string shape marked with the enum trait, or a proper enum shape introduced in Smithy IDL 2.0.
        Parameters:
        directive - Directive to perform.
      • generateIntEnumShape

        void generateIntEnumShape​(GenerateIntEnumDirective<C,​S> directive)
        Generates the code needed for an intEnum shape.
        Parameters:
        directive - Directive to perform.
      • customizeBeforeShapeGeneration

        default void customizeBeforeShapeGeneration​(CustomizeDirective<C,​S> directive)
        Performs any necessary code generation before all shapes are generated, using the created codegen context object.
        Parameters:
        directive - Directive to perform.
      • customizeBeforeIntegrations

        default void customizeBeforeIntegrations​(CustomizeDirective<C,​S> directive)
        Performs any necessary code generation after all shapes are generated, using the created codegen context object before integrations perform customizations.
        Parameters:
        directive - Directive to perform.
      • customizeAfterIntegrations

        default void customizeAfterIntegrations​(CustomizeDirective<C,​S> directive)
        Performs any necessary code generation after all shapes are generated, using the created codegen context object after all integrations have performed customizations.

        This method should be used to do things like:

        • Flush any code writers created by your WriterDelegator.
        • Generate dependency manifests (e.g., poms) from WriterDelegator.
        • Perform any remaining codegen tasks like formatting or validating the generated output.
        Parameters:
        directive - Directive to perform.