Interface DirectedCodegen<C extends CodegenContext<S,?,I>,S,I extends SmithyIntegration<S,?,C>>
- 
- Type Parameters:
- C- Smithy- CodegenContextto use in directed methods.
- S- Settings object passed to directed methods as part of the context.
- I-- SmithyIntegrationtype to use in directed methods.
 
 public interface DirectedCodegen<C extends CodegenContext<S,?,I>,S,I extends SmithyIntegration<S,?,C>>Provides a directed code generation abstraction to make it easier to implement a Smithy code generator for a single service that leverages other abstractions in smithy-codegen-core, includingSmithyIntegration,SymbolProvider,CodegenContext,SymbolWriter, andWriterDelegator.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description CcreateContext(CreateContextDirective<S,I> directive)Creates the codegen context object.SymbolProvidercreateSymbolProvider(CreateSymbolProviderDirective<S> directive)Create theSymbolProviderused to map shapes to code symbols.default voidcustomizeAfterIntegrations(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.default voidcustomizeBeforeIntegrations(CustomizeDirective<C,S> directive)Performs any necessary code generation after all shapes are generated, using the created codegen context object before integrations perform customizations.default voidcustomizeBeforeShapeGeneration(CustomizeDirective<C,S> directive)Performs any necessary code generation before all shapes are generated, using the created codegen context object.voidgenerateEnumShape(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.voidgenerateError(GenerateErrorDirective<C,S> directive)Generates the code needed for an error structure.voidgenerateIntEnumShape(GenerateIntEnumDirective<C,S> directive)Generates the code needed for an intEnum shape.default voidgenerateList(GenerateListDirective<C,S> directive)Generates any code needed for a list shape.default voidgenerateMap(GenerateMapDirective<C,S> directive)Generates any code needed for a map shape.default voidgenerateOperation(GenerateOperationDirective<C,S> directive)Generates the code needed for an operation shape.default voidgenerateResource(GenerateResourceDirective<C,S> directive)Generates the code needed for a resource shape.voidgenerateService(GenerateServiceDirective<C,S> directive)Generates the code needed for a service shape.voidgenerateStructure(GenerateStructureDirective<C,S> directive)Generates the code needed for a structure shape.voidgenerateUnion(GenerateUnionDirective<C,S> directive)Generates the code needed for a union shape.
 
- 
- 
- 
Method Detail- 
createSymbolProviderSymbolProvider createSymbolProvider(CreateSymbolProviderDirective<S> directive) Create theSymbolProviderused to map shapes to code symbols.- Parameters:
- directive- Directive context data.
- Returns:
- Returns the created SymbolProvider.
 
 - 
createContextC 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.
 
 - 
generateServicevoid generateService(GenerateServiceDirective<C,S> directive) Generates the code needed for a service shape.- Parameters:
- directive- Directive to perform.
 
 - 
generateResourcedefault void generateResource(GenerateResourceDirective<C,S> directive) Generates the code needed for a resource shape.- Parameters:
- directive- Directive to perform.
 
 - 
generateOperationdefault void generateOperation(GenerateOperationDirective<C,S> directive) Generates the code needed for an operation shape.- Parameters:
- directive- Directive to perform.
 
 - 
generateStructurevoid generateStructure(GenerateStructureDirective<C,S> directive) Generates the code needed for a structure shape.This method should not be invoked for structures marked with the errortrait.- Parameters:
- directive- Directive to perform.
 
 - 
generateErrorvoid generateError(GenerateErrorDirective<C,S> directive) Generates the code needed for an error structure.- Parameters:
- directive- Directive to perform.
 
 - 
generateUnionvoid generateUnion(GenerateUnionDirective<C,S> directive) Generates the code needed for a union shape.- Parameters:
- directive- Directive to perform.
 
 - 
generateListdefault void generateList(GenerateListDirective<C,S> directive) Generates any code needed for a list shape.- Parameters:
- directive- Directive to perform.
 
 - 
generateMapdefault void generateMap(GenerateMapDirective<C,S> directive) Generates any code needed for a map shape.- Parameters:
- directive- Directive to perform.
 
 - 
generateEnumShapevoid 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.
 
 - 
generateIntEnumShapevoid generateIntEnumShape(GenerateIntEnumDirective<C,S> directive) Generates the code needed for an intEnum shape.- Parameters:
- directive- Directive to perform.
 
 - 
customizeBeforeShapeGenerationdefault 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.
 
 - 
customizeBeforeIntegrationsdefault 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.
 
 - 
customizeAfterIntegrationsdefault 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.
 
 
- 
 
-